Expand my Community achievements bar.

SOLVED

How to create sessions and page views variables in DTM custom JS section?

Avatar

Level 2

I want to set a condition in DTM on Session and Pageviews, how can we create these variables in this.

Also, could anyone share the default variables, functions and methods?

Thanks in Advance!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

As long as you are counting page views on each of those pages, you can get your answer in analytics.  In your case, you have a dimension (page name) and a metric (page views).  You may be able to get your answer directly from a page names report if you can easily filter based on the text of the page name.  If not, read on.

If you want a count of content versus non-content page views, you have a couple choices:

1) Create a classification (in Analytics) of page name (essentially a lookup table that says whether each page name is "content" or "non-content".  This can be done via a file upload (using SAINT) or using the classification rule builder in AA admin,

2) Add a new s.prop in DTM that will capture page type (content / non-content / other).  You can then use this variable as your dimension in reporting. You could even do a breakdown report of this dimension by pageviews if you wanted to know which non-content pages are getting the most traffic.

3) You could set an event (a counter) on each non-content page (in DTM) if all you want is a count of non-content pages.

View solution in original post

4 Replies

Avatar

Community Advisor

Let me re-phrase your question to make sure that I understand it correctly.

You want to know how to use DTM with Adobe Analytics to set the "sessions" and "page views" metrics.

If this is correct, then here is your answer -

First and foremost, you need to install the Adobe Analytics tool in DTM.  This is done from the Overview tab for the property.

You'll need to configure your Adobe Analytics tool, setting up (at a minimum) your tracking server and your report suites.

Screen Shot 2018-06-11 at 9.06.36 AM.png

Assuming that you've done this part, read on.

Counting Sessions :

A session is automatically created upon sending any beacon to Adobe Analytics.  A session is automatically ended upon 30+ minutes of inactivity (30 minutes without a beacon).

Counting Pageviews :

Page Views are automatically counted when a page view beacon is sent (this is the s.t() beacon).  This happens automatically in DTM when the _satellite.pageBottom() tag is executed (assuming that the Adobe Analytics Tool is configured for the DTM property).  It also happens when you select s.t() under Tracking in the Adobe Analytics section of an event or direct call rule (when that rule fires).

Screen Shot 2018-06-11 at 9.04.52 AM.png

Avatar

Level 2

Thanks for you reply, my question was if I want to set any condition on session base like, in single session how many times users visits to my Thread page so that i can increase counter on that base.

  • Non-Content case
    user visits Home Page, Category page, News page, Thread page, 2nd Thread page type and 3rd Thread page type. 
    Adobe Analytics captures the total number of non-content pages viewed as "3".

I am new in DTM might be i thinking in a wrong way, please correct me.

Thanks!

Avatar

Correct answer by
Community Advisor

As long as you are counting page views on each of those pages, you can get your answer in analytics.  In your case, you have a dimension (page name) and a metric (page views).  You may be able to get your answer directly from a page names report if you can easily filter based on the text of the page name.  If not, read on.

If you want a count of content versus non-content page views, you have a couple choices:

1) Create a classification (in Analytics) of page name (essentially a lookup table that says whether each page name is "content" or "non-content".  This can be done via a file upload (using SAINT) or using the classification rule builder in AA admin,

2) Add a new s.prop in DTM that will capture page type (content / non-content / other).  You can then use this variable as your dimension in reporting. You could even do a breakdown report of this dimension by pageviews if you wanted to know which non-content pages are getting the most traffic.

3) You could set an event (a counter) on each non-content page (in DTM) if all you want is a count of non-content pages.

Avatar

Level 10

Did one of the previous replies answer you question? If so, would you mind marking it correct?