Skip to content

Commit

Permalink
Add amp-analytics vendor config for INFOnline
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz committed Feb 15, 2016
1 parent e6c80d4 commit 6abb6fe
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
14 changes: 14 additions & 0 deletions examples/analytics.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,20 @@
</amp-analytics>
<!-- End comScore example -->

<!-- INFOnline example -->
<amp-analytics type="infonline" id="infonline">
<script type="application/json">
{
"vars": {
"st": "angebotskennung",
"co": "comment",
"cp": "code"
}
}
</script>
</amp-analytics>
<!-- End INFOnline example -->

</div>

<div class="logo"></div>
Expand Down
27 changes: 27 additions & 0 deletions extensions/amp-analytics/0.1/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,32 @@ export const ANALYTICS_CONFIG = {
'pageview': 'https://${host}${requestPath}?${basePrefix}',
'click': 'https://${host}${requestPath}?${basePrefix}&pe=lnk_${linkType}&pev1=${linkUrl}&pev2=${linkName}',
}
},

'infonline': {
'vars': {
'sv': 'ke',
'ap': '1'
},
'transport': {'beacon': false, 'xhrpost': false, 'image': true},
'requests': {
'pageview': 'https://3p.ampproject.net/custom/amp-analytics-infonline.html?st=${st}' +
'&sv=${sv}' +
'&ap=${ap}' +
'&co=${co}' +
'&cp=${cp}' +
'&host=${canonicalHost}' +
'&path=${canonicalPath}'
},
'triggers': {
'pageview': {
'on': 'visible',
'request': 'pageview'
}
}
}

};
ANALYTICS_CONFIG['infonline']['triggers']['pageview']['iframe' +
/* TEMPORARY EXCEPTION */ 'Ping'] = true;

10 changes: 10 additions & 0 deletions extensions/amp-analytics/amp-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ Type attribute value: `googleanalytics`

Adds support for Google Analytics. More details for adding Google Analytics support can be found at [developers.google.com](https://developers.google.com/analytics/devguides/collection/amp-analytics/).

##### INFOnline / IVW

Type attribute value: `infonline`

Adds support for [INFOnline](https://www.infonline.de) / [IVW](http://www.ivw.de). Requires the following variables

* `st` (Angebotskennung)
* `co` (Comment)
* `cp` (Code)

##### Krux

Type attribute value: `krux`
Expand Down

0 comments on commit 6abb6fe

Please sign in to comment.