AudienceView Connect

av.page

This document describes the av.page dataLayer object.

av.page describes attributes of the page as seen by the user. av.page persists throughout the user search and is refreshed as the user navigates from page to page.

av.page consists of:

  1. Attributes of the page (in this case, a single attribute)
  2. An object that describes the articles seen by the user on the page
  3. An object that describes the search executed by the user
  4. A utility function that enables easy search of a page to understand if a particular article exists on the page.
For all objects of type array the index means the array index.
 

High Level Attributes

Attribute

Description

Type

Full dataLayer Reference

page_script

Effectively the url of the page minus the domain. e.g "/Online/default.asp"

string

av.page.page_script


top

av.page.search

The search object describes the current state of the search.

Information
A Body with Search article is a search with no user input.

 

Attribute

Description

Type

Full dataLayer Reference

total_records

The total number of records returned by the search

number

av.page.search.total_records

total_pages

The total number of pages returned by the search

number

av.page.search.total_pages

page_size

The page_size of the search

number

av.page.search.page_size

current_page

The current page

number

av.page.search.current_page


top

av.page.search.criteria

This object is a sub object of av.page.search. It describes the user's input into the search.

Attribute

Description

Type

Full dataLayer Reference

Comment

search_from

The user's input search from date

string

av.page.search.criteria.search_from

 

search_to

The user's input search to date

string

av.page.search.criteria.search_to

 

search_criteria

The user's input search criteria

string

av.page.search.criteria.search_criteria

 

category_filter

The user's selected category filter

string

av.page.search.criteria.category_filter

Might refer to MI's category, performance group, etc.

city_filter

The user's selected city filter in the search results

string

av.page.search.criteria.city_filter

 

venue_filter

The user's selected venue filter in the search results

string

av.page.search.criteria.venue_filter

 

month_filter

The user's selected month filter in the search results.

string

av.page.search.criteria.month_filter

Returned as the number of milliseconds since 1970/01/01.

object_type_filter

The user's selected object filter in the search results

string

av.page.search.criteria.object_type_filter

P = Performance
B = Bundle
M = Miscellaneous Item
S = Stored Value
G = Gift
A = Article


top

av.page.articles

The articles array describes the articles seen by the user on the page.

Information
It is not currently possible to return the article name for the non-main body (or Body with Search) articles on the page. The article_title is available for all articles and this field should be set to required in the AudienceView Content Management system.

 

Information
Add-on and up-sell articles are rendered as an iframe on the page. These iframes will generate their own unique instance of the dataLayer that is separate to the parent dataLayer.

For example, referencing the article_title on shoppingCart.asp when an add-on iframe is displayed will return the article_titles for both the parent and the iframe dataLayers. Recommendations are part of the parent dataLayer.

 

 

Attribute

Description

Type

Full dataLayer Reference

Comment

article_id

The GUID of the article on the page

string

av.page.articles[index].article_id

 

article_name

The article name

string

av.page.articles[index].article_name

 

article_title

The article title

string

av.page.articles[index].article_title

 

article_type

The article type

string

av.page.articles[index].article_type

"2" for the main body or body with search article.
"1" for features and banners


top

av.page.articleExists

articleExists is a utility function that allows the user in GTM to write a custom macro that easily queries the page for the existence of an article or articles. The function accepts two parameters:

Parameter

Type

Description

article_type

string or number

The article type as seen in the dataLayer. i.e. 1 or 2

article_title

string or regex

Matches against the article title.

Notes:

  • The function returns true if there is a match, false if there is not.
  • article_type and article_title are optional but one or more must be populated to return results. If none are populated, then the function return true when at least one article exists.
  • article_title is case sensitive unless a case insensitive regex pattern is provided.

Example Usage:

Function Call

 

articleExists('2','Home Page')

returns true if an article exists in the dataLayer with the title of 'Home Page' and the article is the main body or body with search article

articleExists(,'Home Page')

returns true if an article exists in the dataLayer with the title of 'Home Page' and is of any article type

articleExists('2',/Home Page/)

returns true if an article exists in the dataLayer where the title contains 'Home Page' and the article is the main body or body with search article - case sensitive

articleExists('2',/home page/i)

returns true if an article exists in the dataLayer where the title contains 'Home Page' and the article is the main body or body with search article - case insensitive