Skip to content

Instantly share code, notes, and snippets.

@asidorov01
Last active October 20, 2022 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asidorov01/2f5426adb196f19fff26d3d034ac3b46 to your computer and use it in GitHub Desktop.
Save asidorov01/2f5426adb196f19fff26d3d034ac3b46 to your computer and use it in GitHub Desktop.
Coverright Widget Setup, v1.0

Coverright Widget Setup

Setup instructions

This code should be pasted in your page layout, where you want to place the CoverRight widget:

<script id="cover-right-widget-script" src="https://widget1.partners.coverright.com/js/iframe.js"></script>

The widget will take a full container width. We suggest you to don't use a container smaller than 360px in width.

Add custom parameters to a resulting url:

We set UTM tags automatically, but sometimes you might want to set the subid2 or some other parameters in the resulting url. There is way to do that:

window.CoverRightWidgetParams = {subid2: '1234567'};

The var1=1234567 would be added to url and tracked by affiniation link rule.

Full example:

<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
    <div style="width: 360px">
      <script>
        window.CoverRightWidgetParams = {subid2: '1234567'};
      </script>
      <script id="cover-right-widget-script" src="https://widget1.partners.coverright.com/js/iframe.js"></script>
    </div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment