This article is for customers on our Free and Growth plans.
Before you begin
- Installing the tag in a Smarty template (tpl file) involves editing the tag code by placing {literal} delimiters around the code. Without the {literal} Smarty delimiters, your website will only render a blank page.
Installing the Contentsquare tag in a Smarty template
1. Copy your Contentsquare tag from inside Contentsquare.
2. Paste the tag inside a Smarty template (tpl file).
The specific template will depend on how your Smarty project is set up. The template file needs to be one that will be applied across your entire site, such as "header.tpl".
3. Add {literal} delimiters inside the <script> HTML tags of the Contentsquare tag.
<script> {literal} (function(c, s, q, u, a, r, e){ /* ... rest of Contentsquare tag ... */ })(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', 1234567); {/literal} </script>
4. Apply and save the changes.
Allow time for the installation to take effect, then verify the installation in Contentsquare.