google-tag-manager-1

 

Hero-03-framgansrik-marknadsforing

Installing Redeal script using Google Tag Manager

All Redeal functionalities require a script to be included called redeal.js.

This is a step-by-step guide on how to correctly implement the Redeal script on your website using Google Tag Manager.

There are two parts, part 1 is required for all Redeal functionality and part 2 is required in order to use the checkout functionality (Redeal Instant) in an online store.

Before you start

  1. Google Tag Manager needs to be correctly installed/implemented on your website. See this Google resource for reference.
  2. Download and install Redeal plugin for Google Chrome for testing. (optional, but recommended)
  3. Note the URL of the order confirmation page on your website (for Part 2)

Part 1

Part 1 is implementing the redeal.js script globally on your website.

  1. Login to your Google Tag Manager account.
  2. Click "New Tag"

    Step 1-1

  3. Name tag "Redeal Landing"
  4. Click the Pen icon and choose "Custom HTML"
  5. Copy the code below into the HTML field.

    <script>
    (function(i,s,o,g,r,a,m){i['RedealObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window, document, 'script', window.location.protocol + '//static.redeal.se/widget/js/redeal.js', 'redeal');
    </script>

    Step 2-1

  6. Click the trigger field and create a new trigger
  7. Name the trigger "Redeal Landing"
  8. Choose trigger type "DOM.Ready"
  9. Choose "Some DOM Ready Events"
  10. Choose "Page URL" and "contains"
  11. Write "?referer=Redeal"
  12. Click Save and then Submit -> Publish

    Step 3

    Step 4

    Step 5

  13. This concludes Part 1. Good job!
  14. To test and verify that the script is correctly installed on your website, go to [URL of your website]/?referer=Redeal and click "Check Deal" by using the Redeal Google Chrome Plugin.

Part 2

Part 2 is implementing an automatic trigger of the redeal.js script specifically on the "thank you" or "order confirmation" page of your website.

  1. While still logged in to your Google Tag Manager account, click "New Tag".

    Step 1-1

  2. Name tag "Redeal Order Confirmation"
  3. Click the Pen icon and choose "Custom HTML"
  4. Copy the code below into the HTML field.

    <script>
    (function(i,s,o,g,r,a,m){i['RedealObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window, document, 'script', window.location.protocol + '//static.redeal.se/widget/js/redeal.js', 'redeal');

    redeal();
    </script>

    10-1

  5. Click the trigger field and create a new trigger
  6. Name the trigger "Redeal Order Confirmation"
  7. Choose trigger type "DOM.Ready"
  8. Choose "Some DOM Ready Events"
  9. Choose "Page URL" and "contains"
  10. Write in a part of the URL of your "thank you" or "order confirmation" page that is unique and always the same. (For example /thank_you or /order-confirmation.) This is the only part of this guide that may be uniquely different for different websites.
    The trigger should be activated any time your order confirmation page is loaded, but not on any other landing page. A common mistake is to include parts of the URL that are unique and different for every order, but every platform will have a part of the URL string that is present every time the page is loaded, but still only present on the order confirmation page - this is the part of the URL string that should be entered.
  11. Click Save and then Submit -> Publish

    11-1

    12

  12. This concludes Part 2!
  13. To test and verify that the script on your checkout page, create and publish a Redeal Instant deal in the Redeal Manager and make a test purchase on your website.