6. Example Snippets
The examples are derived from codes as of January 2024 and for demonstration purposes only. As we do not update them regularly, it's possible that adjustments may be required in the future. Get the latest snippets from your respective provider.
Verification meta tags
Use case: Verification of your website with several providers.
<!-- Google Search Console Verification Meta Tag -->
<meta name="google-site-verification" content="YOUR_VERIFICATION_CODE" />
<!-- Bing Webmaster Tools Verification Meta Tag -->
<meta name="msvalidate.01" content="YOUR_VERIFICATION_CODE" />
<!-- Pinterest Verification Meta Tag -->
<meta name="p:domain_verify" content="YOUR_VERIFICATION_CODE" />
<!-- Yandex Webmaster Verification Meta Tag -->
<meta name="yandex-verification" content="YOUR_VERIFICATION_CODE" />
Tracking Website Analytics
Use Case: Tracking website analytics with multiple providers such as Google Analytics, Facebook Pixel and Matomo.
<!-- Google Analytics Tracking Code -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
</script>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'FACEBOOK_PIXEL_ID');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=FACEBOOK_PIXEL_ID&ev=PageView&noscript=1"
/></noscript>
<!-- Matomo Tracking Code -->
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//your-matomo-domain.com/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', 'YOUR_SITE_ID']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<!-- Replace 'your-matomo-domain.com' with your Matomo server domain -->
<!-- Replace 'YOUR_SITE_ID' with your Matomo site ID -->
Managing Third-Party Content
Use Case: Managing third-party content with multiple providers such as AdSense and AdRoll.
<!-- AdSense Ad Code -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-XXXXXXXXXXXXXXXX",
enable_page_level_ads: true
});
</script>
<!-- AdRoll Ad Code -->
<script>
adroll_adv_id = "ADROLL_ADV_ID";
adroll_pix_id = "ADROLL_PIX_ID";
adroll_user_identifier = "USER_IDENTIFIER";
(function () {
var _onload = function(){
if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return}
if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return}
var scr = document.createElement("script");
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
scr.setAttribute('async', 'true');
scr.type = "text/javascript";
scr.src = host + "/j/roundtrip.js";
((document.getElementsByTagName('head') || [null])[0] ||
document.getElementsByTagName('script')[0].parentNode).appendChild(scr);
};
if (window.addEventListener) {window.addEventListener('load', _onload, false);}
else {window.attachEvent('onload', _onload)}
}());
</script>
Contact the author