Alireza Amrollahi
Alireza Amrollahi

Reputation: 915

how to implement alexa certify script in the piwik?

how to implement alexa script in piwik subdomain? here is the code :

<script type=“text/javascript”>
_atrk_opts = { 
   atrk_acct:“KeWOp1P8cT20VRss”, domain:“example.com”,dynamic: true};
 (
 function() { 
  var as = document.createElement(‘script’); as.type = ‘text/javascript’; 
  as.async = true; 
  as.src = “https://d31qbv1cthcecs.cloudfront.net/atrk.js“; 
  var s = document.getElementsByTagName(‘script’)[0];
  s.parentNode.insertBefore(as, s); 
}
  )();
</script>
<noscript>
  <img src=“https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=KeWOp1P8cT20VR” style=“display:none” height=“1” width=“1" alt=“” /> 

Upvotes: 2

Views: 367

Answers (1)

Honarkhah
Honarkhah

Reputation: 553

you can edit layout file :

plugins/Morpheus/templates/layout.twig

add your certify code before end of head tag

<script type=“text/javascript”>
_atrk_opts = { 
   atrk_acct:“KeWOp1P8cT20VRss”, domain:“example.com”,dynamic: true};
 (
 function() { 
  var as = document.createElement(‘script’); as.type = ‘text/javascript’; 
  as.async = true; 
  as.src = “https://d31qbv1cthcecs.cloudfront.net/atrk.js“; 
  var s = document.getElementsByTagName(‘script’)[0];
  s.parentNode.insertBefore(as, s); 
}
  )();
</script>
<noscript>
  <img src=“https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=KeWOp1P8cT20VR” style=“display:none” height=“1” width=“1" alt=“” /> 
</noscript>
</head>

Upvotes: 1

Related Questions