Skip to content

Commit

Permalink
add Piwik Pro tag manager code
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Oct 11, 2024
1 parent 14d1018 commit b5716ae
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions docs/src/theme/Footer/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,20 @@ owa_cmds.push(['trackClicks']);
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa, _owa_s);
}());`}}/>
<script dangerouslySetInnerHTML={{__html: `
(function(window, document, dataLayerName, id) {
window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString();f="; SameSite=Strict"}document.cookie=a+"="+b+d+f+"; path=/"}
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
tags.async=!0,tags.src="https://jcubic.containers.piwik.pro/"+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts);
!function(a,n,i){a[n]=a[n]||{};for(var c=0;c<i.length;c++)!function(i){a[n][i]=a[n][i]||{},a[n][i].api=a[n][i].api||function(){var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1)})}}(i[c])}(window,"ppms",["tm","cm"]);
})(window, document, 'dataLayer', '018719ec-6793-4a2d-92f9-b8b88a01d43c');`}}/>
<script dangerouslySetInnerHTML={{__html: `
var _paq = _paq || [];
_paq.push(['setTrackingSource', 'jstc_tm']);
_paq.push(['enableLinkTracking']);
_paq.push(['setIpTracking', true]);
_paq.push(['setDomains', ['lips.js.org']]);
_paq.push(['trackPageView']);
_paq.push(['enableJSErrorTracking']);
(function(p,i,w,ik) {
var g=ik.createElement('script'),s=ik.getElementsByTagName('script')[0];
_paq.push(['setTrackerUrl', p]);
_paq.push(['setSiteId', w]);
g.type='text/javascript';g.async=true;g.defer=true;g.src=i;s.parentNode.insertBefore(g,s);
})('https://jcubic.piwik.pro/ppms.php','https://jcubic.containers.piwik.pro/ppms.js','018719ec\u002D6793\u002D4a2d\u002D92f9\u002Db8b88a01d43c',document)`}}/>
</footer>
);
}

0 comments on commit b5716ae

Please sign in to comment.