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.


Import Tags

Import Retention Container

  • Import the prebuilt retention.com container from our app. Follow this guide to learn how to use pre-built Google Tag Manager containers.
    • (See Figure 1)

Step 1 screenshot

_Figure 1_

Customize Triggers

📘

Once you have the tags in your Google Tag Manager container, the next step is creating triggers that are specific to your site.

Customize Retention.com - Suppression:

  • Once you have imported the Retention container into your Google Tag Manager workspace, use the left-hand navigation menu to locate and click on the "Tags" tab. From the list of your tags, locate and click on the "UPDATE AFTER IMPORT Retention - Suppression" tag.
    • 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.
      • (See Figure 2)

Step 2 screenshot

_Figure 2_

Customize Retention.com - Base Script:

  • The next tag we will customize is the base script. Locate and click on the "UPDATE AFTER IMPORT- Retention.com - Base Script" from your list of tags. 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 use third party checkouts that don't use the native Shopify checkout, you will 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.
      • (See Figure 3)

Step 3 screenshot

_Figure 3_

Customize Retention.com - Purchase Tag:

  • The next tag we will work on is the purchase tag. Locate and click on the "UPDATE AFTER IMPORT - Retention.com - Purchase Tag" from your list of tags.
    • 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.
      • (See Figure 4)

Step 4 screenshot

_Figure 4_

Customize Retention Account ID:

  • Finally you will need to update your Retention ID. Use the left-hand navigation menu to locate and click on the "Variables" tab. From the list of your variables, locate and click on the "UPDATE AFTER IMPORT - Retention.com Account ID" variable.
  • Navigate to the section of the window titled "Value" and use the text box to enter your Retention account ID. Delete the UPDATE AFTER IMPORT - portion of the tag title.
    • (See Figure 5)

Step 5 screenshot

Figure 5

  • 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