Let's see how to install the GDPR-compliant Pinterest pixel, thanks to MyAgilePrivacy's WordPress plugin.
Solution 1 - automatic scan
You can use the advanced "Cookie Shield" feature.
That mode is able to automatically detect this Software, so you simply set the Shield in "Learning" mode, browse the pages of the site, and find your configuration ready.
Otherwise, you can use manual configuration.
Solution 2 - manual configuration
As indicated by the official Pinterest guides, the Tag code looks like this:
<!-- Codice di base pixel Pinterest -->
<script type="text/javascript">
!function(e){if(!window.pintrk){window.pintrk=function(){window.pintrk.queue.push(
Array.prototype.slice.call(arguments))};var
n=window.pintrk;n.queue=[],n.version="3.0";var
t=document.createElement("script");t.async=!0,t.src=e;var
r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}("https://s.pinimg.com/ct/core.js");
pintrk('load', 'YOUR_TAG_ID');
pintrk('page');
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=init&noscript=1" />
</noscript>
<!-- Fine codice di base pixel Pinterest -->
There are two specific points that you have to consider and you have to customize, and they are these:
pintrk('load', 'YOUR_TAG_ID');
<img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=init&noscript=1" />
In both of these lines you will find the reference YOUR_TAG_ID.
You will need to replace YOUR_TAG_ID with your ID, which you can retrieve in the admin panel of your business account on Pinterest.
Once you have customized your code, all you have to do is:
- Access the My Agile Privacy cookie list (from the WordPress admin menu: My Agile Privacy -> cookie list)
- find the cookie named"Pinterest Conversion Tag"
- Enter the code in the Html Raw field. See the image below.
Don't forget to save and publish the Cookie by clicking the blue "Publish" button in the upper right corner.
Next, ensure you have correctly installed the Pinterest Tag on your website. Upon loading any page, you'll observe that the tag remains inactive until you explicitly provide consent for the cookie installation. This can be done by either clicking "I agree" on the cookie acceptance bar or by navigating to "Customize" and activating the cookie.
What if you want to track conversions on specific pages?
To track conversions on specific pages, or as certain events are triggered, you will need to add additional blocks of specific code, at the points best suited to properly track your conversion.
For example, if you want to track the acquisition of a contact as a result of signing up for a newsletter, you will need to add this code to the thank you page:
<script>
pintrk('track', 'checkout');
</script>
However, this code will not be executed unless consent is first given to the installation of the cookie (thus to the execution of the main code).
By following these steps, you'll achieve an advanced Pinterest Tag configuration that enables tracking of specific events, all while remaining fully compliant with GDPR and Cookie Law regulations.