How to integrate Google Analytics with Zoho PageSense using Google Tag Manager

Integrate Google Analytics with Zoho PageSense via Google Tag Manager

You can effortlessly integrate Google Analytics (GA) with Zoho PageSense using Google Tag Manager. GTM is a free tool that allows you to quickly add and update your code (tags) on your website without having to manually write a single line of code. By integrating GA via GTM, you can push all your A/B and Split URL experiment data, and view in-depth visitor metrics about the experiments running on your website within Google Analytics. This is a one-time integration process. 
To perform the integration, you need to ensure that you have a GTM account, and have at least one A/B or Split URL test running on PageSense.
Before you start with the below procedures, log in to your Google Tag Manager account and select the Workspace you want to integrate with Zoho PageSense.

Create custom HTML tag in GTM

To setup the integration, you need to create a custom HTML tag that collects relevant data from the PageSense experiment. This tag helps push the PageSense's experiment data to GTM's data layer variables, which you create in the next step. 

To create custom HTML tag in GTM:
1. Go to the left pane, click Tags, then click the New button. 


2. In the Untitled Variable field, enter your tag name as 'PageSense Custom HTML'.

3. Click the 
Tag icon, then select Custom HTML from the list. 



4. Copy-paste the below code inside the HTML window: 

<script> 

if(window.ZAB && window.ZAB.experimentsLoaded) {

window.ZAB.GAGTMIntegFunc();


if(document.addEventListener){

document.addEventListener("zpsExperimentsLoaded", function() {

window.ZAB.GAGTMIntegFunc();

}, false);

} else {

document.attachEvent("zpsExperimentsLoaded", function() {

window.ZAB.GAGTMIntegFunc();

});

}

</script>

 5. Click the trigger icon and choose All Pages with the trigger type as  Page View.



6. Click Save in the top-right corner.


Create data layer variables in GTM

Next, create two data layer variables in GTM to transfer every test and variation data to GA. These variables are defined by PageSense tracking code. 

To create data layer variables in GTM:
1. Go to the left pane, click Variables, then click the New button.


2. In the Untitled Variable field, enter your variable name as 'PageSenseExperimentName'.

3. Click the 
Variable icon and select Data Layer Variable from the list.



4. Enter the following details in the Variable Configuration page, then click Save:
  1. Variable type as Data Layer Variable. 
  2. Data Layer Variable Name as PageSenseExperimentName.
  3. Data Layer Version as Version 2.

5. Create your second Data Layer Variable. Again, on the left pane, click Variables then the New button.

6. In the 
Untitled Variable field, enter your variable name as 'PageSenseVariationName'. 

7. Click the Variable icon and select Data Layer Variable from the list.

8. Enter the following details in the Variable Configuration page:
  1. Variable type as Data Layer Variable. 
  2. Name as PageSenseVariationName.
  3. Data Layer Version field as Version 2.

9. Once you're done, click Save in the top-right corner.

Create a trigger for custom event in GTM 

To transfer the PageSense data to Google Analytics, you need to create and define a trigger of type 'custom event' in GTM. In this case, the trigger is set to fire on all pages of your website, and sends the required data variable information to Google Analytics. It acts like a connecting bridge between GTM and GA.

To create a new trigger for custom event in GTM:
1. Go to the left pane, click Triggers, then click the New button.


2. In the Untitled Tag field, enter the trigger name as 'zohoPageSenseEvent'.

3. Click the trigger icon, choose trigger type as Custom Event from the list. 


4. 
Enter the following details in the Trigger Configuration page:
  1. Event name as zohoPageSenseEvent.
  2. This trigger fires on as All Custom Events.


5. Click Save.

Create a tag for GA in GTM 

To complete the process in the GTM dashboard, you need to create a tag. This GA tags are code snippets that finally push the data captured by the variables that is fired by the triggers, onto to your Google Analytics when 'zohoPageSenseEvent' triggers. Later, it sends all the information collected from the running A/B and Split URL test experiment from PageSense to Google Analytics. 

To create a tag for GA in GTM:
1. Go to the left pane, click Tags, then click the New button.


2. In the Untitled Tag field, enter your tag name as 'GA PageSense'.

3. Click the 
Tag icon, then select Google Analytics: Universal Analytics from the list.


4. Enter the following details in the Tag Configuration page: 
The tracking parameters you will set in this step depends on what data you  want to integrate and view on Google Analytics. Here, we will use the standard parameters "category" and "action" from our Event.
  • In Track Type, select Event.

  • In Category, select Zoho PageSense.

  • In Action as {{PageSenseExperimentName}}:{{PageSenseVariationName}}

  • In Non-Interaction Hit as True.

  • In Google Analytics Settings, choose Select Settings Variable.

  • Select the Enable overriding settings in this tag option.

  • In Tracking ID, copy-paste the Tracking ID from Google Analytics, which you will find in the GA admin page, under Tracking Info. 


5. Click the Triggering icon and choose zohoPageSenseEvent of type Custom Event from the list.


6. Click the Save in the top-right corner.



7. Click the Submit button on the top-right corner and enter the version name and description of the changes made.



8. Click 
Publish to publish the tag and start running your experiments using the PageSense tools.


Enable Google Analytics integration within PageSense

Now that you have configured GTM, you just need to enable GA integration from the PageSense tool. 

To enable GA within PageSense:
1. On the left pane, click either the A/B Test or Split URL Test and choose the required experiment you want to view reports.

2. Now, click the 
CONFIGURATION tab on the top bar, scroll down to Add Integrations section and click on here to enable the Google Analytics button from the Integrations list.

View reports in Google Analytics

Once you have successfully integrated PageSense with GA via GTM, you can view website's report for the a/b and split URL test on your Google Analytics account.

To view reports in Google Analytics:
1. Login to your Google Analytics account, on the left pane, click Behavior, then Events.

2. Click the 
Overview button.

3. You can view a summary of your test results as shown in the image.
The report provides an overview of all your original and variations of a/b and split tests in GA. It includes experiment metrics such as a total number of visits and unique visits.
 








    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION





                        Still can't find what you're looking for?

                        Write to us:  support@zohoforms.com


                                



                            





                          Manage your brands on social media




                              Zoho Marketing Automation

                                Zoho Sheet Resources

                                 




                                    Zoho Forms Resources


                                      Secure your business
                                      communication with Zoho Mail


                                      Mail on the move with
                                      Zoho Mail mobile application

                                        Stay on top of your schedule
                                        at all times


                                        Carry your calendar with you
                                        Anytime, anywhere




                                              Zoho Sign Resources

                                                Sign, Paperless!

                                                Sign and send business documents on the go!

                                                Get Started Now





                                                        Zoho TeamInbox Resources



                                                                Zoho DataPrep Resources



                                                                  Zoho DataPrep Demo

                                                                  Get a personalized demo or POC

                                                                  REGISTER NOW


                                                                    Design. Discuss. Deliver.

                                                                    Create visually engaging stories with Zoho Show.

                                                                    Get Started Now










                                                                                          • Related Articles

                                                                                          • Integrate Google Universal Analytics with Zoho PageSense

                                                                                            With the Google Universal Analytics(UA) integration, you can track the web metrics of each variation in your experiment running on Zoho PageSense. This page will provide you details on how you can integrate Zoho PageSense with Google Analytics using ...
                                                                                          • Install the PageSense code snippet using Tag Manager

                                                                                            If you're using Google Tag Manager (GTM) to integrate with Zoho PageSense, you can use the PageSense tag available in the tag list to quickly install the code snippet on your website instead of manually adding them every time. Once you add the tag, ...
                                                                                          • Integrate using Google Tag Manager

                                                                                            After setting up with integration, a tag with the PageSense code snippet will be created in your Google Tag Manager workspace. Submitting this workspace change will add the PageSense code snippet to your the website pages. To integrate with Pagesense ...
                                                                                          • Integrate Mixpanel with Zoho PageSense

                                                                                            If you are using Mixpanel to monitor your website's traffic and get more visibility on how customers interact with your site pages, then integrating with PageSense can help you extract powerful insights about your A/B and Split URL experiment data. ...
                                                                                          • Create and launch a Split URL test in PageSense

                                                                                            Use Split URL testing when you want to test multiple versions of your web page hosted on different URLs. This type of test is considered best when you notice several deficiencies in your existing page that might affect conversion. In such cases, it's ...
                                                                                          Wherever you are is as good as
                                                                                          your workplace

                                                                                            Resources

                                                                                            Videos

                                                                                            Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                            eBooks

                                                                                            Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                            Webinars

                                                                                            Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                            CRM Tips

                                                                                            Make the most of Zoho CRM with these useful tips.



                                                                                              Zoho Show Resources