analytics.js
, which Google will likely deprecate in the next year or two. gtag.js
replaces analytics.js
and is considered as a single library for all of Google's marketing products, hence the "global site tag" name. It is important to keep in mind that migrating between analytics.js
to gtag.js
is not exact and some features were deprecated or automated.medium
, source
, name
, content
, term
, and/or id
. Both medium
and source
are required if id
is not passed. campaign
data field (in the Custom Data Fields section) to have the value of the newly created data element. ga
and trackerName
parameters will not exist, and the syntax for your custom code will very likely need to change. page_path
, page_title
, and page_location
respectively). dimensionX
or metricY
, you must instead map the dimensions to a unified key/value pair (we call them "data fields" in the extension) that is then used in the Set persistent values action. Google has done this to provide unity across all of their products, simplifying the deployment. To map the dimensions to the data field names, you must do this within the gtag extension configuration, under the Custom Dimensions & Metrics section. dimension1
is for the visitor's account type, in the extension configuration, you'd map the dimension1
to account_type
: