How to display widgets only in Google

Ever wondered if you can show your widgets only on Google? It’s possible with Google Tag Manager!

All you need to do is just follow these steps:

Choose Triggers section in your workspace panel and click on New


Select DOM Ready → Some DOM Ready Events → Referrer contains google



Then go back to the workspace panel, choose Tags and click New


Select Custom HTML in the Tag Configuration section


Replace the first line of your widget installation code with the script in the dropdown, paste it to the HTML field and save changes
<script>
  const platform = document.createElement("script");
  platform.src = "https://static.elfsight.com/platform/platform.js";
  platform.defer = true;
  platform.setAttribute('data-use-service-core', "");
  document.body.prepend(platform);
</script>


In the Triggering section, choose Dome Ready and save changes



The final step is to push changes to your website by clicking on the Submit button


Guys, was this tutorial helpful? Don’t hesitate to share your feedback and questions in the comments below - we are all ears :slightly_smiling_face:

1 Like