Is there a way to add different Google Analytics tracking accounts? I've been looking around but I only find examples and sites are using 1 single account:
<script type="application/json">
{
"requests": {
"pageview": "https://example.com/analytics?url=${canonicalUrl}&title=${title}&acct=${account}",
"event": "https://example.com/analytics?eid=${eventId}&elab=${eventLabel}&acct=${account}"
},
"vars": {
"account": "ABC123"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},...
You can copy paste the amp-analytics tag twice. Or you can use use two triggers. Here are some examples:
Two separate tags:
<amp-analytics>
<script type="application/json">
{
"vars": {
"account": "ABC123"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},...
<amp-analytics>
<script type="application/json">
{
"vars": {
"account": "PQR987"
},
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
},...
Two triggers:
<amp-analytics>
<script type="application/json">
{
"triggers": {
"trackPageview": {
"on": "visible",
"request": "pageview"
"vars": {
"account": "ABC123"
},
},
"trackPageview2": {
"on": "visible",
"request": "pageview"
"vars": {
"account": "PQR987"
},
},...