How To Install Retention.com's Scripts Using Elevar's Data Layer
Install Retention's Scripts In Minutes Using Elevar's Prebuilt Google Tag Manager Containers
Overview
Learn how to install Retention's scripts in minutes using Elevar's prebuilt Google Tag Manager containers
Retention.com offers its clients the ability to collect email addresses for site visitors, without email submissions. In order to work with retention.com you'll need to install their scripts on your site, and connect those scripts to the events that happen on your site.
Using Elevar's data layer and our prebuilt Retention.com Google Tag Manager container, setup is quick and easy.
Prerequisites:
Before starting the setup you will need your Retention tag/account ID. Please contact your account rep for this information.
Tag Setup
- Import the prebuilt retention.com container from our app by following the steps of this guide.
Once you have the tags in your Google Tag Manager container, the next step is creating triggers that are specific to your site.
- The first tag we will customize is the tag labelled "UPDATE AFTER IMPORT_ - Retention.com - Suppression". This tag prevents retention.com from searching for email addresses of visitors you already know the address of. For this to work, you need a trigger for each email submission event that can occur on your site, for example, if you have a footer email submission, you will need to create a trigger that fires when this event occurs. Depending on the nature of your email forms, you may be able to use Google's article to detect email form submissions. Custom code may be required to detect each submission. Once these submissions are tied to a trigger, add these triggers to the tag and remove the UPDATE AFTER IMPORT - portion of the tag title.
- The next tag we will customize is the Retention.com - Base Script. The idea here is we don't want this tag to fire when the purchase tag fires. If you don't use any third party checkouts, this tag should function without modification.
- If you do use third party checkouts that don't use the native Shopify checkout, you'll need to create a trigger exception for these urls. You can follow the "Shopify thank you page" exception trigger attached to this tag as a guide, copy it, and modify the url the exception triggers on, then attach it to the Retention.com - Base Script tag. Remove the UPDATE AFTER IMPORT - portion of the tag title.
- The next tag we will work on is the Retention.com - Purchase tag. If you are using the standard Shopify checkout. No modifications are required to this tag. If you use a third party checkout, that takes place on a third party site, you'll need to account for these purchases by creating a purchase event trigger, and adding it to this tag. Once complete, remove the UPDATE AFTER IMPORT - portion of the tag title.
- Lastly, we will make sure the Retention account ID has been added properly to the account ID variable in Google Tag Manager. Delete the UPDATE AFTER IMPORT - portion of the tag title and ensure that your Retention account ID is in the tag instead of "TEST"
- (See Figure 1)
Figure 1
- You can now publish your changes and make your Retention tags live on your site.
Once the installation is complete, check with your Retention account rep to ensure data is being received. Often, configuration may need to be completed inside the Retention app to complete the setup.
Klaviyo
- If you use Klaviyo tags in your Google Tag Manager container, follow Retention's articles on adding custom code to these tags, to trigger retention events, and create custom flows in Klaviyo.
- Add to cart code
- View item code
Updated 5 months ago