At a glance: Add the Smart Banners code to your website to convert your website visitors into mobile app users.
Note
AppsFlyer Smart Banner web SDK v1 was deprecated on Nov. 8th, 2023. To show Smart Banners on your website you need to upgrade to v2. Learn more
Website code implementation
This article is intended for marketers who want to implement the Smart Banners code on their site via one of:
- Google Tag Manager (GTM)
- Adobe Launch Tag Manager
- Shopify
- Wix
- Squarespace
- WordPress
To add the code to your website via other platforms, or to make changes to the code based on need (including adding parameters, deep linking, hiding the banner, or integrating PBA with Smart Banners), see Smart Banners website code implementation for developers.
To implement the Smart Banners code on your site:
- Follow the website workplace instructions to get the Smart Banners code.
- Use the platform-specific instructions that follow to implement the code into your website:
Google Tag Manager
To implement the code via Google Tag Manager:
- In GTM, create a new tag.
- Name the tag, click Tag Configuration, and select Custom HTML.
- In the HTML box, paste the Smart Banner code snippet. Replace YOUR-BANNER-KEY in the snippet with your actual banner key.
- Click Triggering and create a new trigger by clicking on the plus icon at the top right-hand corner of the screen.
- Name the trigger, and then, under Trigger Configuration, and choose Page View.
- If you want the banner to show up on all pages, select All Page Views. If you want the banner to show up on selected pages, select Some Page Views and define the condition to trigger the tag. To learn more about triggers, read GTM's documentation.
- Click Save at the top right-hand corner.
- Return to the tag configuration screen. Verify that all is set and click Save at the top right-hand corner.
- Publish your GTM container.
Adobe Launch Tag Manager
To implement the code via Adobe Launch Tag Manager:
Step 1: Create a property in Adobe Experience Cloud
To create a property (tag) that hosts the Smart Banners code:
- Go to Adobe Experience Cloud > Launch.
- Under Adobe Experience Cloud Launch, click Go to Launch.
- Click New Property.
- Name your property.
- Under Platform, select Web.
- Enter your website domain.
- Click Save.
Step 2: Add Smart Banners code to the Adobe Launch property
To add the Smart Banners code to the tag:
- On My web property page, select the Rules tab.
- Name the rule. Recommended: AppsFlyer Smart Banners.
- In the If section, under Events, click +Add.
- Under Event Type, select Core - DOM Ready.
- Click Keep Changes.
- In the Then section, under Actions, click +Add.
- Under Action Type > Custom Code.
- Select JavaScript > Open Editor and paste the Smart Banners SDK snippet without the <script> tags.
- Click Keep Changes to close the code editor.
- Click Save.
Step 3: Add the Adobe Launch tag to your website
To add the Adobe Launch tag to your website (which loads the Smart Banners code):
- On the My web property page, select the Environments tab.
- Find the row with the environment you want to publish (development or production).
- Under the Install header, click the box icon on the relevant row; this is usually a production environment.
- See the section about publishing the Adobe Launch environment.
- In the Web Install Instructions dialog box:
- Copy the script code snippet.
- Close the dialog box.
- Paste the code snippet into the <head> tag of your website.
Step 4: Publish the Adobe Launch environment
To publish the environment to activate the Adobe Launch tag:
- On the My web property page, go to the Publishing tab.
- Under the Development section, click Add New Library.
- Name the library and choose an environment.
- Under Resource Changes, click Add a Resource.
- Click Rules > Load Smart Banners > Latest > Select & Create a New Revision.
- Click Save.
- Under the Development section:
- Next to the newly created library, click the Action menu (3 dots) and select Build for Development.
- Click the action menu again and select Submit for Approval.
- Under the Submitted section:
- Click the action menu and select Build for Staging.
- Click the action menu again and select Approve for Publishing.
- Under the Approved section click the action menu and select Build & Publish to Production.
The process is now complete.
Now, when your website loads on mobile, the banner's active creative will be displayed. To only display the banner on certain pages or according to user actions, see Adobe Launch rules.
Shopify
To implement the code in your Shopify website:
- In your Shopify dashboard, go to Sales Channels > Online Store > Themes.
Your current theme displays. - Click Actions > Edit code.
The Edit code page opens for your theme. - In the Layout folder, click the file that starts with {/} theme.
The webpage code displays. - In the code, directly under <head>, paste your Smart Banners code.
Wix
To implement the code in your Wix website:
- In your Wix dashboard, click Settings.
- In the Advanced section of the Settings page, click Custom code.
- Click + Add Custom Code.
- In the Paste the code snippet here box, paste the Smart Banners code.
- In the Name box, enter a name for your code. Recommended: AppsFlyer Smart Banners.
- In Add Code to Pages, select where to display your banners. Either:
- All pages
- Choose specific pages
- Click Apply.
The Custom Code page should now show your code. Make sure it is placed in the Head section.
Squarespace
To implement the code in your Squarespace website:
- In your Squarespace dashboard, click Website.
- Click Settings.
- Click Advanced.
- Click Code Injection.
- In the Header section, paste the Smart Banners code.
- Click Save.
WordPress
To implement the code in your WordPress website:
- In your WordPress dashboard, click Appearance > Theme Editor.
The Edit Themes page opens and the CSS code for your website displays. - Under Theme Files, click Theme Header (header.php).
- In the code that displays, under <head>, paste the Smart Banners code.
- Click Update File.