Data Collection — Page Tagging (JavaScript)


Exhibit 20.4   Google Analytics Universal Analytics tracking code.

Page tags are snippets of JavaScript code attached to web pages, used for tracking users. The most widely used page tag is the Google Analytics Universal Analytics tracking code (Exhibit 20.4), which is named analytics.js.

This is how page tags work:

  1. The JavaScript code executes every time a web page is loaded, irrespective of whether sourced from cache, proxy server or the website’s server.
  2. The script calls back the website’s server and passes the user’s information to the server.
  3. Call backs are asynchronous, ajax based, so they do not to impair performance.
  4. The JavaScript assigns a persistent cookie to store client ID on user’s device. When the user re-visits the page, the stored ID identifies the user, provided, of course, that the cookie has not been deleted.
  5. If data is collected through a third party such as Google Analytics, the data is passed onto that party’s server. For tracking purposes, the service provider will assign a site ID.

Page tagging is a big improvement over server logs, yet it too has drawbacks. The most significant issue is the deletion of cookies. The implication is that repeat users are counted as new users, whenever cookies are deleted. This drawback is covered in more detail in the sections Tracking Users and Cookies.

Previous     Next

Note: To find content on MarketingMind type the acronym ‘MM’ followed by your query into the search bar. For example, if you enter ‘mm consumer analytics’ into Chrome’s search bar, relevant pages from MarketingMind will appear in Google’s result pages.







Marketing Analytics Workshop

Marketing Analytics Workshop

In an analytics-driven business environment, this analytics-centred consumer marketing workshop is tailored to the needs of consumer analysts, marketing researchers, brand managers, category managers and seasoned marketing and retailing professionals.


Digital Marketing Workshop

Digital Marketing Workshop

Two-day hands-on training on Digital Marketing, conducted at the NUS Business School. Designed to make you more effective in developing and executing digital marketing strategies. You learn to use Google Search Console, Google Analytics and Google Ads to execute online marketing initiatives, run search and display advertising campaigns, and track and optimize performance.


What they SHOULD TEACH at Business Schools

What they SHOULD TEACH at Business Schools


Is marketing education fluffy too?


Experiential Learning via Simulators | Best Way to Train Marketers

Experiential Learning via Simulators | Best Way to Train Marketers


Marketing simulators impart much needed combat experiences, equipping practitioners with the skills to succeed in the consumer market battleground. They combine theory with practice, linking the classroom with the consumer marketplace.