How to install the Funnelytics script with Google Tag Manager
Google Tag Manager (GTM) acts as a hub to install all of your tracking and analytics scripts. It also provides advanced triggering options that will allow you to fire specific scripts, called tags, on certain events (like clicks, page scroll, video views, and form submissions).
Google tag manager comes with two code snippets. One goes in the <head> section of your site and the other goes at the end of the <body> section.
In WordPress, it's easy to install the script using a plugin like Insert Headers and Footers.
Regardless of the platform, you need to install the codes in the <head> and <body> of the HTML on the pages you want GTM to be on.
To install it, you will need to know the Container ID.
If you click on the container ID you will see two code snippets. One that goes in the <head> and one that goes in the <body> section of the HTML.
Install the Funnelytics Script through GTM
Now that we have Google tag manager installed on our page, we need to install the Funnelytics script into Google tag manager.
Grab the Funnelytics code snippet from the workspace settings
- Click on your workspace on the left side of the Funnelytics dashboard
- Click on settings
- Copy the script to your clipboard
Add a tag in GTM
Now let's go back to Google tag manager and create a new tag that is set to fire on all pages.
- Click on Tags
- Click the Red 'New' button
- Give the tag a title (ex: Funnelytics base code)
- Click on tag configuration
- Choose Custom HTML
- Paste the Funnelytics script in the HTML box
- Under advanced settings > tag firing options select 'Once per page'
Great! Now we need to select a trigger for our script to fire on. For the base code, we are going to tell it to fire on all pages.
- Under the tag configuration settings click on 'Triggering'
- Select the trigger named 'All pages'
- Hit Save in the top right
This will now fire the Funnelytics script on all pages of our website where GTM is installed.
NOTE: The Funnelytics Script CANNOT be installed more than once per page as this will cause conflicts in the tracking, resulting in altered numbers.
If the script was installed directly on the site before adopting GTM, assure that it has been completely removed.
Using multiple scripts from different workspaces on the same site/pages will cause the same issues.
If you have any questions or need further clarification with installing or verifying your script, remember to reach out to our support team anytime by clicking the support icon in the bottom-right corner of your dashboard, we are always ready to assist you!