Google Analytics / Google Tag Manager
19 min
official websites site url website https //developers google com/analytics https //developers google com/analytics documentation pxp implements two options that can be implemented on the web these are via google analytics 4 https //support google com/analytics/answer/9304153 https //support google com/analytics/topic/14088998 via google tag manager https //support google com/tagmanager/answer/6102821 https //support google com/tagmanager/answer/6102821 developer integrations platform url android \<font color="#ff6900">not supported\</font> ios \<font color="#ff6900">not supported\</font> web https //developers google com/analytics/devguides/collection/ga4 https //developers google com/analytics/devguides/collection/ga4 pxp implements two options that can be implemented on the web these are via google analytics 4 \<font color="#9900ef"> \</font> via google tag manager \<font color="#9900ef"> \</font> \<font color="#9900ef"> \</font> \<font color="#9900ef">( ) \</font> available since pxp 3 7 0 \<font color="#9900ef">(\</font> \<font color="#9900ef"> \</font> \<font color="#9900ef"> \</font> \<font color="#9900ef">) \</font> available since pxp 4 0 0 tracking service event support matrix overview of the supported events and their configuration templates parameter \<font color="#2166ae">actions\</font> \<font color="#3b9f0f">trigger\</font> \<font color="#9900ef"> \</font> \<font color="#3b9f0f"> action label category\</font> \<font color="#3b9f0f">supported \</font> (web) \<font color="#2166ae">views\</font> \<font color="#3b9f0f">trigger\</font> \<font color="#9900ef"> \</font> \<font color="#3b9f0f"> name\</font> \<font color="#3b9f0f">title\</font> \<font color="#9900ef"> \</font> \<font color="#3b9f0f">supported \</font> (web) \<font color="#2166ae">purchases\</font> and \<font color="#2166ae">attributes\</font> are not supported \<font color="#9900ef">( )\</font> \<font color="#0c121d"> the \</font> \<font color="#3b9f0f">trigger\</font> \<font color="#0c121d"> and \</font> \<font color="#3b9f0f">title\</font> \<font color="#0c121d"> templates are used by google tag manager only \</font> general structure in tracking config json the tracking service key name in " tracking config json " is " \<font color="#2166ae">google analytics\</font> " general structure { "google analytics" { "eventsenabledbydefault" true, "viewsenabledbydefault" true, "purchasesenabledbydefault" false, "attributesenabledbydefault" false, "events" { // your configured list of events }, "views" { // your configured list of events }, "purchases" {}, "attributes" {} } } event configuration actions google analytics 4 / google tag manager supports action events more informations for action events can be found here https //app archbee com/docs/qtjkvew7g556yo3qfoyay/8rra4o7vzdaw13y joqek https //app archbee com/docs/qtjkvew7g556yo3qfoyay/8rra4o7vzdaw13y joqek action event "action event key" { "templates" { "trigger" "the name of the trigger in google tag manager", "action" "value of template", "category" "value of template", "label" "value of template" }, "parameters" { "parameter key 1" "value of parameter", // your configured list of parameters (supported via web only) } } example "issue downloaded" { "templates" { "action" "issue downloaded {{issue name}}", "category" "epaper", "label" "issue downloaded" } } example with parameters "issue downloaded" { "templates" { "action" "issue downloaded {{issue name}}", "category" "epaper", "label" "issue downloaded" }, "parameters" { "issue id" "{{issue id}}", "issue name" "{{issue name}}", "issue categories" "{{issue categories}}", "issue tags" "{{issue tags}}", "issue purchasable" "{{issue purchasable}}", "issue purchased" "{{issue purchased}}", "publication id" "{{publication id}}", "publication name" "{{publication name}}" } } templates template key required template value \<font color="#3b9f0f">trigger\</font> no the name of the trigger in google tag manager \<font color="#3b9f0f">category\</font> \<font color="#eb144c">yes\</font> the category of the event \<font color="#3b9f0f">action\</font> \<font color="#eb144c">yes\</font> the action of the event \<font color="#3b9f0f">label\</font> \<font color="#eb144c">yes\</font> the label of the event parameters parameter name template value the name of the parameter the value of the parameter views google analytics 4 / google tag manager support view events for the "view event key" additional information can be found here https //app archbee com/docs/qtjkvew7g556yo3qfoyay/mixe5 ijkbr47eummdyga#3tm1p view event "view event key" { "templates" { "trigger" "the name of the trigger in google tag manager", "name" "value of template", "title" "value of template" }, "parameters" { "parameter key 1" "value of parameter", // your configured list of parameters (supported via web only) } } example google analytics 4 "storefront feed" { "templates" { "name" "feed" } } example google tag manager "storefront feed" { "templates" { "name" "feed", "title" "my feed", } } templates template key required template value \<font color="#3b9f0f">trigger\</font> no the name of the trigger in google tag manager \<font color="#3b9f0f">name\</font> no the name of the view used by google tag manager only \<font color="#3b9f0f">title\</font> no the title of the page this value overrides the default value how the default value is created titles for content on the web are generated using a complex algorithm involving several preprocessing software components this results in the title tag within the html document matomo in web uses its value as page title parameters pameter name template value the name of the parameter the value of the parameter purchases google analytics 4 / google tag manager does not support purchase events attributes google analytics 4 / google tag manager does not support attributes additional supported functionality no additional functionality is currently supported how to configure native purple app enable sdk google analytics does not provide a standalone native integration to use google analytics in your native apps, you must do so through firebase docid\ utcmd84ebm3lbu7ybwe s apple privacy / att since there is no native sdk available in the apps, there is no att controlled behavior consent management since there is no native sdk available in the apps, there is no cmp controlled behavior web integration you can use the purple experience builder docid\ kmuf0oag3of3a46iup5q4 to edit the " experience config json " google analytics is not explicitly enabled if a valid configuration of google analytics is present in the " experience config json ", the sdk is integrated into the html document this can be done either as google analytics 4 or as google tag manager the corresponding configurations differ as follows structure in experience config json google analytics 4 { "purple" { "analytics" { "ga4" { "configuration" { "measurementid" "provided by google analytics 4" } } } } } google tag manager { "purple" { "analytics" { "ga4" { "configuration" { "usetagmanager" true, "addnoscript" true | false, "containerid" "provided by google tag manager" } } } } } google analytics 4 setting description measurementid measurement id of your connected ga4 google tag manager setting description usetagmanager enables the google tag manager instead of google analytics 4 addnoscript add the noscript iframe element to the body element default is "false" containerid the id of the connected container when using the google tag manager a further setup at google tag manager dashboard is needed please read on more here google tag manager setup guide docid\ v33emkmulyt1yw v4yfn2 consent management if you use one of the cmps supported by purple, you must specify the cmp specific vendor id for google analytics, which you can get from your cmp frontend additionally, the iab vendor id for google analytics can also be added structure in experience config json google aanalytics with consent { "purple" { "analytics" { "ga4" { "configuration" { "measurementid" "provided by google analytics 4" }, "consent" { "vendorid" "provided by your cmp", "iabvendorid" "" } } } } } google tag manager with consent { "purple" { "analytics" { "ga4" { "configuration" { "usetagmanager" true, "addnoscript" true | false, "containerid" "provided by google tag manager" }, "consent" { "vendorid" "", "iabvendorid" "" } } } } } consent setting description vendorid the vendor id managed by your cmp iabvendorid the vendor id managed by iab