All Collections
INTEGRATION
PLUG-IN INTEGRATIONS
Instructions for integration with TRAY platform
Instructions for integration with TRAY platform
Wioleta Jednaka avatar
Written by Wioleta Jednaka
Updated over a week ago

1. Log in to your Google Tag Manager account:

Sign in to your Google Tag Manager account at https://tagmanager.google.com/ using your Google credentials. Make sure you have access to the account that contains the GTM container that should be deployed to your Tray store.

2. Check Container Configuration:

Within Google Tag Manager, select the container that is associated with your Tray store. Make sure all tags, triggers, and variables are configured correctly for your needs. Also make sure that the tags you want to implement on your store are published.

If there is no container installed on GTM: How to install container.

3. Login to Tray:

Log in to the Tray platform > Go to Settings > Integrations > Google Tools.

4. Check the GTM installed on the website:

5. Back to Google Tag Manager:

Creating the variable is very simple, just access your Google Tag Manager panel and click on "variables" in the side menu and finally on the New button.

6. Creating the variable:

Your variable must contain the following information:

The variable name: nonce

Variable type: DOM element

Element code: gtmScript

Attribute name: data-hash

With this variable created, now let's start the edrone script.

7. Configuring the edrone tag:

In GTM, access the “Tags” option and then click on “New”.

8. Click Tag Setup and add a custom HTML element:

9. Add the edrone script:

  1. Copy the code below and paste it into the field indicated in the image. "Don't forget to change the information "YOUR_APP_ID" in the script. If you don't know this information, please contact edrone support.

<script type="text/javascript" nonce="{{nonce}}">
/*
* edrone JavaScript Library.
* https://edrone.me/
*
* GPL licenses.
* https://edrone.me/integration-license/
*/
(function (srcjs) {
window._edrone = window._edrone || {};
_edrone.app_id = "SEU_APP_ID";
_edrone.platform_url_script =
"https://d2vfa2a1j2oldr.cloudfront.net/traymodule/traymodule.min.js";
var doc = document.createElement("script");
doc.type = "text/javascript";
doc.async = true;
doc.setAttribute("nonce", "{{nonce}}");
doc.src =
("https:" == document.location.protocol ? "https:" : "http:") + srcjs;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(doc, s);
})("//d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js");
</script>

10. Important: Add the tag name: edrone, insert the script in the tag configuration field and DO NOT forget to check the option Support document.write:

11. Now let's add the trigger ruler to our script:

Select the trigger option and then select ALL PAGES.

12. Save:

13. Almost there... Select the created tag and click PUBLISH:

14. Nice... You are integrated! 🎉

Did this answer your question?