Sharath
Sharath

Reputation: 606

How to pass the page name via GTM to GA?

I want to use GTM to get the page views shown in google analytics along with the page name. With the current configuration that I have done, it does reach GA but visited page shows as '/' and does not show the page name. I have tried with two different variables as shown below:

// dataLayer that I defined in my index page is as shown below

<!-- dataLayer for Google Tag Manager -->
<script>
    dataLayer = [{ 'pageView': 'layOut' }, { 'pageTitle': 'layOut' }];
    </script>
<!-- End dataLayer for Google Tag Manager -->

Screenshot of the configuration is shown below:

Screenshot of Configuration in GTM

Upvotes: 0

Views: 1713

Answers (1)

DanielS
DanielS

Reputation: 856

You will find pageTitle by default in Google Analytics. The Dimensions is calles "Page Title" you can add it for exmple as second Dimension to your "Landing Page" or "All Pages" report. You can also use it to build a custom Report / Dashboard

enter image description here

Upvotes: 1

Related Questions