Skip to content

Commit 3c60629

Browse files
authored
Analytics for adskeeper (ampproject#40461)
1 parent 19dcf20 commit 3c60629

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

examples/analytics-vendors.amp.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<option>acquialift</option>
4949
<option>adobeanalytics</option>
5050
<option>adobeanalytics_nativeConfig</option>
51+
<option>adskeeper</option>
5152
<option>alexametrics</option>
5253
<option>amplitude</option>
5354
<option>appsflyer</option>
@@ -234,6 +235,23 @@
234235
</amp-analytics>
235236
<!-- End Adobe Analytics example -->
236237

238+
<!-- AdsKeeper tracking.
239+
Please replace the values for "site", "client_id", and "publishers_sites_id"
240+
with your AdsKeeper configuration values.
241+
-->
242+
<amp-analytics type="adskeeper" id="adskeeper">
243+
<script type="application/json">
244+
{
245+
"vars": {
246+
"site": "SITE_ID",
247+
"client_id": "CLIENT_ID",
248+
"publishers_sites_id": "PUBLISHERS_SITES_ID"
249+
}
250+
}
251+
</script>
252+
</amp-analytics>
253+
<!-- End AdsKeeper example -->
254+
237255
<!-- Alexa tracking -->
238256
<amp-analytics type="alexametrics">
239257
<script type="application/json">

extensions/amp-analytics/0.1/test/vendor-requests.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"pageview": "https://!host/b/ss/!reportSuites/2/amp-1.0/s_random_?vid=z_client_id(adobe_amp_id)_&ndh=0&ce=_document_charset_&pageName=_title_&g=_ampdoc_url_&r=_document_referrer_&bh=_available_screen_height_&bw=_available_screen_width_&c=_screen_color_depth_&j=amp&s=_screen_width_x_screen_height_",
1212
"click": "https://!host/b/ss/!reportSuites/2/amp-1.0/s_random_?vid=z_client_id(adobe_amp_id)_&ndh=0&ce=_document_charset_&pageName=_title_&g=_ampdoc_url_&r=_document_referrer_&bh=_available_screen_height_&bw=_available_screen_width_&c=_screen_color_depth_&j=amp&s=_screen_width_x_screen_height_&pe=lnk_o&pev1=!linkUrl&pev2=!linkName"
1313
},
14+
"adskeeper": {
15+
"pageview": "https://c.adskeeper.com/pv?site=!site&client_id=!client_id&publishers_sites_id=!publishers_sites_id&i=1&pr=_external_referrer_&cbuster=_random_&pvid=_page_view_id_64_&implVersion=19&cxurl=_canonical_url_&pv_types=tpv&scua=%22_uach(architecture)_%22&scub=%22_uach(bitness)_%22&scu_amp=_uach(brands)_&scufvl_amp=_uach(fullVersionList)_&scum=%3F_if(_equals(_uach(mobile)__%2Ctrue)_, 1, 0)&scumd=%22_uach(model)_%22&scup=%22_uach(platform)_%22&scupv=%22_uach(platformVersion)_%22&scufv=%22_uach(uaFullVersion)_%22&scuw=%3F_if(_equals(_uach(wow64)__%2Ctrue)_, 1, 0)&gdpr_consent=_if(_equals(_consent_metadata(consentStringType)_%2C1)_%2C_consent_string_)__if(_equals(_consent_metadata(consentStringType)_%2C2)_%2C_consent_string_)_&gdpr=_if(_equals(_consent_metadata(gdprApplies)_%2Ctrue)_%2C1)__if(_equals(_consent_metadata(gdprApplies)_%2Cfalse)_%2C0)_&us_privacy=_if(_equals(_consent_metadata(consentStringType)_%2C3)_%2C_consent_string_)_&gpp=_if(_equals(_consent_metadata(consentStringType)_%2C4)_%2C_consent_string_)_&gpp_sid=_if(_equals(_consent_metadata(consentStringType)_%2C4)_%2C_consent_metadata(gppSectionId)_)_"
16+
},
1417
"afsanalytics": {
1518
"host": "//www.afsanalytics.com",
1619
"base": "//www.afsanalytics.com/cgi_bin/",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"vars": {
3+
"site": "",
4+
"client_id": "",
5+
"publishers_sites_id": ""
6+
},
7+
"requests": {
8+
"pageview": "https://c.adskeeper.com/pv?site=${site}&client_id=${client_id}&publishers_sites_id=${publishers_sites_id}&i=1&pr=${externalReferrer}&cbuster=${random}&pvid=${pageViewId64}&implVersion=19&cxurl=${canonicalUrl}&pv_types=tpv&scua=%22${uach(architecture)}%22&scub=%22${uach(bitness)}%22&scu_amp=${uach(brands)}&scufvl_amp=${uach(fullVersionList)}&scum=%3F$IF($EQUALS(${uach(mobile)}, true), 1, 0)&scumd=%22${uach(model)}%22&scup=%22${uach(platform)}%22&scupv=%22${uach(platformVersion)}%22&scufv=%22${uach(uaFullVersion)}%22&scuw=%3F$IF($EQUALS(${uach(wow64)}, true), 1, 0)&gdpr_consent=$IF($EQUALS(CONSENT_METADATA(consentStringType), 1), ${consentString})$IF($EQUALS(CONSENT_METADATA(consentStringType), 2), ${consentString})&gdpr=$IF($EQUALS(CONSENT_METADATA(gdprApplies), true), 1)$IF($EQUALS(CONSENT_METADATA(gdprApplies), false), 0)&us_privacy=$IF($EQUALS(CONSENT_METADATA(consentStringType), 3), ${consentString})&gpp=$IF($EQUALS(CONSENT_METADATA(consentStringType), 4), ${consentString})&gpp_sid=$IF($EQUALS(CONSENT_METADATA(consentStringType), 4), CONSENT_METADATA(gppSectionId))"
9+
},
10+
"triggers": {
11+
"trackPageview": {
12+
"on": "visible",
13+
"request": "pageview"
14+
}
15+
},
16+
"transport": {
17+
"beacon": false,
18+
"xhrpost": false,
19+
"image": true
20+
}
21+
}

extensions/amp-analytics/analytics-vendors-list.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ Do not use both the `adobeanalytics` and `adobeanalytics_nativeConfig` types on
4141
Type attribute value: `adobeanalytics_nativeConfig`
4242
-->
4343

44+
### AdsKeeper
45+
46+
Type attribute value: `adskeeper`
47+
48+
Adds support for AdsKeeper analytics. More information can be found at [adskeeper.com](https://adskeeper.com).
49+
50+
4451
### AFS Analytics
4552

4653
Type attribute value: `afsanalytics`

0 commit comments

Comments
 (0)