Install CUX snippet with Google Tag Manager

Modified on Tue, 10 Oct 2023 at 01:09 PM

TABLE OF CONTENTS


To install the CUX snippet on your website subpage, you can use Google Tag Manager (GTM). This method is the quickest and easiest way to start collecting data in CUX. If you already have GTM implemented, you can get insights in just a few minutes without having to navigate through your website's code or admin panel. 


Install CUX code with GTM:


Before you start

  • Make sure you have a set up and configured Google Tag Manager account and container for the website you want to monitor with CUX.



Step by Step: Installing the CUX snippet with GTM

  1. Sign in to Google Tag Manager.
  2. Select the account and container for the site you want to monitor with CUX.

  3. Go to Tags and click New.

  4. Enter a name for the tag — for example, CUX insights.

  5. Click Tag Configuration and select Custom HTML.

  6. Copy the CUX code from your account. Make sure you select the right project if you have more than one. For more information, see Where can I find the CUX code?

Remember that the CUX  snippet is unique to each project (website), so you will need to repeat these steps for every unique site you want to track with CUX.


    7. Paste your CUX code in the HTML field.

    8. Set up a trigger. Select All pages to ensure the best insight into your visitor behaviour. You can optionally add exceptions for pages that you don’t want to be monitored with CUX.

    9. Save your new GTM tag configuration.

    10. Use the GTM preview feature to see if the CUX code starts. 

        10.1. Click Preview in GTM. It will inform you that the preview mode is on. 

        10.2. Open your site in a new browser tab. 

        10.3. Once a page is loaded, GTM opens a panel in at the bottom of the browser window, where it shows all scripts that it triggered there. You should be able to see CUX on the list.

    12. Navigate to GTM and switch off the preview mode.

    13. Click Submit to publish the changes. That’s it! The tracking starts momentarily.

    14. Log in to CUX to verify if the code works. See below under See Checking if the CUX code works.


Please note, we make sure to have this set of instructions as accurate as possible. It may happen that when Google redesign their tools, we may be slightly out of sync. 

It’s always best to check Google’s help for the most up-to-date description. If you’re still unsure how to install a custom HTML snippet in GTM, see the official Google documentation.


Checking if the CUX snippet works.

To check if the snippet is functioning, open a few pages on your browser and go to the CUX dashboard. You will see the numbers appearing on the dashboard as soon as the code starts sending data to our database. If the code installation instructions were displayed upon logging in to CUX, they will disappear once we record the first visit and make it available for replay.

Data layer integration

Please note that while CUX has the option to collect data from your website's Data Layer, this process does not automatically integrate your CUX project with it. Currently, DataLayer Capture integration is available to all enterprise customers. If you’re interested in adding it to your account, please contact our support team for more information at sales@cux.io

Once you enable the integration, you’ll be able to search for visits that triggered specific GTM events. Learn more about the integration with Data Layer.


Next steps:

  • Visits: Start investigating recordings & see what your users are actually doing on your pages. To learn more about visits and what they mean for your business check article about Visits.

  • Heatmaps: Explore user behavior on your website through visual heat maps that show what interests your users the most and what catches their eye. To learn more about heatmaps and their value, see this article.

  • Goals: Goals let you focus on data only relevant to your business goal – regardless if it's a purchase, form submission, file download, registration, go to checkout, clicks, scroll. Learn more about Goals here.

  • Enable Data Layer integration to start finding visits that trigger specific GTM events.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article