Skip to content

Commit

Permalink
✨ [vendor-config] Add permutive-ampscript vendor config (#37359)
Browse files Browse the repository at this point in the history
* adds permutive-ampscript vendor config

* format fixes

* use https for permutive support link

* address markdown link checker 403 error

* disable permutive links as well
  • Loading branch information
Zeeshan Rasool committed Feb 1, 2022
1 parent 89fdad7 commit 14b9309
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 1 deletion.
11 changes: 11 additions & 0 deletions examples/analytics-vendors.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
<option>oracleInfinityAnalytics</option>
<option>parsely</option>
<option>permutive</option>
<option>permutive-ampscript</option>
<option>piano</option>
<option>pinpoll</option>
<option>piStats</option>
Expand Down Expand Up @@ -1373,6 +1374,16 @@
</amp-analytics>
<!-- End Permutive example -->

<!-- Permutive-amp-script example -->
<amp-analytics type="permutive-ampscript" id="permutive-ampscript">
{
"extraUrlParams": {
"customProperty1": "customValue1"
}
}
</amp-analytics>
<!-- End Permutive-amp-script example -->

<!-- Start Piano example -->
<amp-analytics type="piano" id="piano">
<script type="application/json">
Expand Down
45 changes: 45 additions & 0 deletions extensions/amp-analytics/0.1/vendors/permutive-ampscript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"transport": {
"amp-script": true
},
"requests": {
"onPageLoad": "amp-script:permutiveSdk.savePageContext",
"onScroll": "amp-script:permutiveSdk.trackScrollEvent",
"onInterval": "amp-script:permutiveSdk.trackEngagedTime"
},
"triggers": {
"trackPageLoad": {
"on": "ini-load",
"request": "onPageLoad"
},
"trackScroll": {
"on": "scroll",
"scrollSpec": {
"verticalBoundaries": [
5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,
95, 100
]
},
"request": "onScroll"
},
"trackTimeOnPage": {
"on": "timer",
"timerSpec": {
"interval": 5,
"immediate": false,
"maxTimerLength": 600
},
"request": "onInterval"
}
},
"extraUrlParams": {
"type": "amp",
"title": "${title}",
"domain": "${canonicalHost}",
"url": "${canonicalUrl}",
"referrer": "${documentReferrer}",
"user_agent": "${userAgent}",
"pageHeight": "${scrollHeight}",
"verticalScrollBoundary": "${verticalScrollBoundary}"
}
}
31 changes: 30 additions & 1 deletion extensions/amp-analytics/analytics-vendors-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ Type attribute value: `amplitude`

Type attribute value: `appsflyer`

<!-- markdown-link-check-disable -->

Adds support for AppsFlyer. More details for adding AppsFlyer support can be found at [appsflyer.com](https://support.appsflyer.com/hc/en-us/articles/360001610038#amp-support)

<!-- markdown-link-check-enable -->

### AT Internet

Type attribute value: `atinternet`
Expand Down Expand Up @@ -159,8 +163,12 @@ Adds support for comScore Unified Digital Measurement™ pageview analytics. Req

Type attribute value: `cxense`

<!-- markdown-link-check-disable -->

Adds support for Cxense Insight analytics. Requires defining _var_ `siteId` with Cxense-provided _siteId_. More details can be found at [wiki.cxense.com](https://wiki.cxense.com/display/cust/Accelerated+Mobile+Pages+%28AMP%29+integration).

<!-- markdown-link-check-enable -->

### Deep.BI

Type attribute value: `deepbi`
Expand Down Expand Up @@ -421,8 +429,12 @@ Adds support for Nielsen Marketing Cloud. More details can be found at [Nielsen

Type attribute value: `oewa`

<!-- markdown-link-check-disable -->

Adds support for [OEWA](http://www.oewa.at). Requires a copy of [amp-analytics-oewa.html](http://www.oewa.at/fileadmin/downloads/amp-analytics-oewa.html) on a different subdomain than the including AMP file ([why?](https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-iframe-origin-policy.md)). The file must be served via HTTPS. For example, if your AMP files are hosted on `www.example.com`, then `amp-analytics-oewa.html` needs to be on another subdomain such as `oewa-amp.example.com`. More details for adding OEWA support can be found [here](http://www.oewa.at/Implementierung).

<!-- markdown-link-check-enable -->

Additionally, the following variables must be defined:

In the `vars` section:
Expand Down Expand Up @@ -462,8 +474,21 @@ Adds support for Permutive event collection. Additionally, the following `vars`

- `namespace`: your Permutive AMP namespace
- `key`: your Permutive public API key
<!-- markdown-link-check-disable -->
Use `extraUrlParams` to add additional event properties. Full configuration details can be found at [support.permutive.com](https://support.permutive.com/hc/en-us).
<!-- markdown-link-check-enable -->

Use `extraUrlParams` to add additional event properties. Full configuration details can be found at [support.permutive.com](http://support.permutive.com).
### Permutive-ampscript

Type attribute value: `permutive-ampscript`

Adds support for Permutive event collection via the Permutive SDK running inside `amp-script`. This is a newer version of the `Permutive` configuration mentioned above. It will soon replace the old configuration.

<!-- markdown-link-check-disable -->

To add additional properties to Permutive events use the `extraUrlParams` property and use the `customProperties` key to define any custom properties. The value should be a valid json object. Full configuration details can be found at [support.permutive.com](https://support.permutive.com/hc/en-us).

<!-- markdown-link-check-enable -->

### Piano

Expand Down Expand Up @@ -523,9 +548,13 @@ Type attribute value: `retargetly`

Type attribute value: `rudderstack`

<!-- markdown-link-check-disable -->

Adds support for RudderStack page views and events.
Find out more on the implementation check our documentation at [docs.rudderstack.com](https://docs.rudderstack.com/rudderstack-sdk-integration-guides/amp-analytics).

<!-- markdown-link-check-enable -->

### Segment

Type attribute value: `segment`
Expand Down

0 comments on commit 14b9309

Please sign in to comment.