Install PetMySite with Google Tag Manager

If your website already loads a Google Tag Manager container, you can add your pet with one Custom HTML tag, without touching your site’s code. Ad blockers often block Tag Manager, though, so some visitors won’t see the pet.

Before you start

Visitors with an ad blocker won’t see the pet. Many ad and tracking blockers block Tag Manager itself, and with it every tag inside. A pet added this way is missing for those visitors, and so is anything it opens. If you can edit your site’s code, use the manual install or the WordPress plugin instead. Use Tag Manager only when it’s the one way you can add code.

  • The Tag Manager container must already be installed on every page of your website. PetMySite loads wherever the container loads.
  • You need permission to edit and publish that container, or someone who can approve your change.
  • Your chat provider should be installed and working. PetMySite opens it rather than replacing it.

Copy your install code

In PetMySite, open your website, go to Installation, choose Manual, select Continue and then Copy code. The same code works in Tag Manager. It looks like this:

<script async src="https://cdn.petmysite.com/pet.js" data-site="YOUR_SITE_KEY"></script>
Example only. Copy your own code from Installation in your PetMySite website, where YOUR_SITE_KEY is already filled in.

Create the tag

  1. Open tagmanager.google.com and select the container used on your website.
  2. Go to Tags and select New. Name the tag PetMySite.
  3. Select Tag Configuration and choose Custom HTML.
  4. Paste your install code into the HTML box. Leave Support document.write turned off.
  5. Select Triggering and choose All Pages.
  6. Select Save.

Paste the code exactly as copied. Tag Manager keeps the data-site attribute, which tells the pet which website’s settings to load.

Preview before publishing (optional)

Select Preview in Tag Manager, enter your website address and connect. Your site opens with the draft container, and the Tag Assistant panel should list PetMySite under Tags Fired. The pet appears in that preview window.

Publish

  1. Select Submit in the top-right corner.
  2. Add a version name such as “Add PetMySite”, then select Publish.

Until you publish, the tag exists only in your workspace and visitors won’t see the pet.

Verify installation

  1. Back in PetMySite, continue to the last step of Installation and select Verify installation.
  2. Your website opens in a new tab. When the pet loads, it checks in and the Installation page shows Verified.

Troubleshooting

The pet doesn’t appear

  • Confirm the latest container version is published, not just saved.
  • Check the tag’s trigger is All Pages and it isn’t paused.
  • Make sure the page you’re testing is on the same domain as your PetMySite website. The pet only loads on that domain; www. is ignored, but other subdomains and staging addresses are not the same website.
  • If your site sends a Content Security Policy, allow https://petmysite.com and https://cdn.petmysite.com for scripts, connections, images and fonts, and permit WebAssembly. A policy that forbids inline styles blocks the current widget; contact support before changing it.
  • If you use an ad blocker, turn it off for your site or test in a private window without extensions. It may be blocking Tag Manager.

Some visitors don’t see the pet

Ad and tracking blockers often block Tag Manager itself, and with it every tag inside. Move the pet out of Tag Manager: delete or pause the PetMySite tag, then add the same code with the manual install. Keep only one of the two, so the pet isn’t loaded twice.

If you added extra code to the tag, such as a JavaScript API handler that opens your chat, move it too. Hiding your chat’s own launcher only makes sense when the pet loads for every visitor; otherwise visitors with an ad blocker have no way to open chat.

The pet appears but chat doesn’t open

Keep your chat provider’s own script or tag active. If that is also in Tag Manager, make sure it fires on the same pages.

Other ways to install

Every method loads the same pet with the same settings. Use one method per website.

Still stuck? Email support@petmysite.com with your website address and the method you used.