Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// change your piwik server host
// change YOUR_SITE_ID with your site id
<amp-pixel src="https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM"></amp-pixel>
@insekticid

This comment has been minimized.

Copy link

insekticid commented Sep 10, 2016

thank you

@fboes

This comment has been minimized.

Copy link

fboes commented Nov 29, 2016

I'd like to propose a improvement:

// change your piwik server host
// change YOUR_SITE_ID with your site id
// All other variables will be replaced by AMP, see https://github.com/ampproject/amphtml/blob/master/spec/amp-var-substitutions.md
<amp-pixel src="https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&amp;rec=1&amp;action_name=TITLE&amp;urlref=DOCUMENT_REFERRER&amp;url=CANONICAL_URL&amp;rand=RANDOM"></amp-pixel>

…by quoting & as &amp;. Otherwise: Good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.