Created
February 2, 2017 16:06
-
-
Save Albert-IV/357d43a6dea638659ce68228f53e54ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Piwik --> | |
<script type="text/javascript"> | |
var _paq = _paq || []; | |
_paq.push(['trackPageView']); | |
_paq.push(['enableLinkTracking']); | |
//Store Piwiks tracking information so we can reference it later | |
_paq.push([function() { | |
// Set global variables | |
var piwik_visitorId = this.getVisitorId(); | |
var piwik_campaign = this.getAttributionCampaignName(); | |
var piwik_keyword = this.getAttributionCampaignKeyword(); | |
var piwik_referrer = this.getAttributionReferrerUrl(); | |
// And update any elements that depend on the field values | |
$('.piwik-vid').val(piwik_visitorId); | |
$('.piwik-campaign').val(piwik_campaign); | |
$('.piwik-keyword').val(piwik_keyword); | |
$('.piwik-referrer').val(piwik_referrer); | |
}]); | |
(function() { | |
var u="//suretybonds.piwikpro.com/"; | |
_paq.push(['setTrackerUrl', u+'piwik.php']); | |
_paq.push(['setSiteId', 1]); | |
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | |
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment