ChurnReturn DEEN

Help › Installing the script

Installing the script

The script is only a few kilobytes, loads asynchronously and needs no key. Your website is recognized by the domain you entered in the dashboard.

WordPress and WooCommerce: plugin

Download plugin

  1. In the WordPress admin, go to Plugins, Add New, “Upload Plugin” and choose the ZIP file.
  2. Install and activate. Done.

The plugin does exactly one thing: it loads the snippet on all pages, but not in the admin area and not in the Customizer. There are no settings in the WordPress admin; everything is configured at churnreturn.com. The product feed comes from WooCommerce, a feed plugin or your affiliate network.

Directly in the source code

Add one line before </body> in the template that is loaded on every page, usually the footer or layout:

<script src="https://churnreturn.com/cr.js" async></script>

That's all you need. The script loads the website's configuration, checks the status and URL rules and waits for a trigger.

Via Google Tag Manager

The easiest way is our tag template: Download template

  1. In Tag Manager, go to Templates, Tag Templates, New, open the menu at the top right, choose Import, select the downloaded file and save.
  2. Tags, New, tag type ChurnReturn, action “Snippet laden” (load snippet; the template labels are in German).
  3. Trigger All Pages.
  4. Check the preview, publish.

The template has two more actions: “Einwilligung melden” (report consent) for a tag that fires on your cookie tool's consent event, and “Eigenen Trigger auslösen” (fire custom trigger) for shop events such as the cart. As soon as the template is approved in the Tag Manager gallery, you'll find it there under “ChurnReturn”.

Without the template, you can also use a tag of type Custom HTML with the script line above and the All Pages trigger.

Consent via Tag Manager: in the default mode the script stores nothing and may always fire. When your consent tool grants consent, report it with a second HTML tag that is triggered by the consent event:

<script>window.ChurnReturn && ChurnReturn.consent(true);</script>

If the script should only load after consent, give the main tag a requirement such as analytics_storage under “Consent Settings”. This isn't necessary, but some privacy concepts require it.

Shop systems

SystemWhere the line goes
Shopware 6“Custom Code” extension or the theme template base.html.twig, block base_body_script; alternatively Tag Manager
ShopifyOnline Store, Themes, Edit code, theme.liquid before </body>
WooCommerceTheme file footer.php or a plugin for header/footer scripts
Magento 2Content, Configuration, Design, HTML Footer
JTL-ShopSettings, Global, “Footer scripts” or the template
OXID eShopIn the active theme, the base template before </body> (OXID 6: layout/base.tpl, OXID 7: layouts/base.html.twig); if you don't want to touch the theme, use Tag Manager
plentymarketsplentyShop LTS: plugin settings, section for custom scripts in the footer, or the Google Tag Manager plugin with our template
GambioIn the current template, the footer file (StyleEdit or theme folder) before </body>, alternatively Gambio's Tag Manager module
All othersWherever you also add analytics or tracking pixels

Test before anyone sees it

As long as the website is in Preview status, the overlay only appears on addresses with ?cr_preview, for example https://shop.example.com/product/xyz?cr_preview. Open the browser console: the script reports which configuration was loaded and why a trigger doesn't fire.

Things to keep in mind

  • Content Security Policy: If your site has one, https://churnreturn.com must be allowed under script-src and connect-src.
  • Include it only once: If the script is in your source code, you don't need a tag in Tag Manager. The script prevents duplicate overlays, but not duplicate loading.
  • Multiple domains: Each domain is a separate website in the dashboard; the line is the same everywhere.
  • Staging: Add your staging domain as a separate website so you can test there with its own settings.

Next: Triggers and rules →