October 2017
Intermediate to advanced
370 pages
8h 57m
English
Another common analytics task is to track social engagement. The following example shows how we might track Twitter shares, based on clicks of an element with ID twitter-share:
"triggers": { "twitterShares" : { "on": "click", "selector": "#twitter-share", "request": "social", "vars": { "socialNetwork": "twitter", "socialAction": "tweet", "socialTarget": "${ampdocUrl}" } }}
The Google Analytics social request has the following variables:
Earlier, we saw that variables can be injected into ...
Read now
Unlock full access