Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section helps you connect your store with PersonaClick. It is critical for further set up.

Panel
titleThis page cover the following:

Table of Contents

Insert JS-code Snippet

Insert this JS-code snippet into the <head> section of all public HTML pages of your website: AnchorTopTop

Code Block
languagejs
<script>
(function(r){
    window.personaclick=window.personaclick||function(){(window.personaclick.q=window.personaclick.q||[]).push(arguments)};
    var s=document.getElementsByTagName(r)[0],rsc="//cdn.personaclick.com",v="/v3.js",s={link:[{href:c,rel:"dns-prefetch"},{href:c,rel:"preconnect"},{href:c+v,rel:"preload",as:"script"}],script:[{src:c+v,async:""}]};
    Object.keys(s).forEach(function(c){s[c].forEach(function(d){var e=document.createElement(rc);rs.async=1;rs.src='//cdn.personaclick.com/v3.js';s.parentNode.insertBefore(rs,s);})('script');
// Init everything
personaclick('init', '%YOUR_STORE_KEY%');
</script>
Warning
titleIMPORTANT

In this code, replace the STORE_KEY placeholder with the Store Key value of your online store. You can always find your Store Key in your personal account on personaclick.com (Dashboard > Settings > Store Settings).

...

,a;for(a in d)e.setAttribute(a,d[a]);document.head.appendChild(e)})});
})();
personaclick("init", "%YOUR_STORE_KEY%", success, error);
</script>