How It Works

Find out how our solution helps you turn browsers into buyers.

Integrations

From Shopify to Klaviyo, explore over 80 integrations.

Support

Access guides, troubleshooting, and expert assistance.

About Us

Hear our origin story and meet our team.

Partnership

Become an official Retention.com Partner.

Affiliate Program

Learn more about our Affiliate Program.

Careers

Explore career opportunities with Retention.com.

Events

See upcoming events we’re hosting or attending.

Referrals

Got a referral? Let us know here.

Product Support

privacy-red-circle

Add snippet script to custom website

If you're using a custom site or a site builder that isn't on our list here, you will need to work with your developer to add the collection, suppression, and revenue tracking scripts.

Note: If you use the custom Shopify integration app, the scripts will be added for you.

Where to find your collection snippet script

1. From your Retention Dashboard, click Code Script.  Then, click View Your Script.

2. Check the box next to Collection, and then click Copy Code </>. You’ll see a green box in the top right-hand corner telling you the code was copied to your clipboard.

Copy Collection

Remember: You can’t check multiple boxes for scripts or you will get an error message. You can only copy one at a time.

How to add collection script

1. You can set the collection script to fire on all pages (suggested for a higher collection rate) or only on specific pages. To fire the script on all pages, copy/paste the collection script to your site's header or theme wherever you can add custom javascript to your site builder.

Remember: Where you add the script for a custom site varies, so work with a developer who has knowledge and access to the backend of your website.

Authorize the domain

1. Once you’ve added the script to your domain, go back to Code Script in Retention.com and click the edit icon next to Authorized Domains.

2. Paste the domain/URL in the text box where you added the script, and click Save Changes. If your site is 'website.com' (and not 'www.website.com'), don't include 'www.'

It will be highlighted in green if the script is properly installed—and in orange if the script is not properly added. You may need to refresh the page after testing for it to turn to green. If it's incorrect, there will be an orange or red error box in the top-right corner with more details.

How to set up collection rules

You can set up rules that are used to automatically trigger a collection event based on the number of page views and/or seconds on a page. This allows you to collect higher-level contacts.

1. To set up the rules, click Code Script in the left-hand navigation and then click the edit icon next to Collection Rules.

2. Toggle to Yes to Auto collect the contact after X page views, and type the number of Page Views in the box. For example, if you want a visitor to have 2 page views before the collection script is triggered, type ‘2’ in the box.

3. Toggle to Yes to Auto collect the contact after X seconds on a single page, and type the number of Seconds in the box. For example, if you want the collection script to wait 10 seconds before it fires, type ’10’ in the box.

4. When you’re finished, click Save Changes.

How to add suppression script

The suppression script can be added to your website on any pages that you do NOT want Retention.com to collect email addresses. Generally speaking, you would put this script on landing pages where the person has already converted, and therefore, you have already collected their email address.

Examples of pages you’d want to add the suppression script to are thank you pages and when a sign-up form is submitted. For more information on using the suppression script and suppression rules, click here.

1. From your Retention.com Dashboard, click Code Snippet in the left navigation and then View Script. Then, check the box next to Suppression, and click Copy Code.

How to add revenue tracking script

Add the revenue tracking script to fire on your post-checkout/confirmation page to track your ROI and suppress contacts that make a purchase. Follow the steps here to add it to your site.

Note: The revenue tracking script also suppresses contacts, so this should only be used on your post-checkout/confirmation pages. You do not need the suppression script with the revenue tracking script.

How to confirm your script's working

Click here to learn how to test your script.

chevron-down