I've just started using Tag Manager combined with Schema JSON-LD for the first time. I am attempting to use Custom HTML but have hit a brick wall when attempting to assign Custom HTML to a URL based on Page View.

I'm using the following custom html:

<script type="application/ld+json">
    "@context": "http://schema.org",
    "@type": "ProfessionalService",
    "additionalType": "http://www.productontology.org/id/Web_design",
    "name": "BYBE",
    "description": "The Web Design Company",
    "telephone": "01202 949749",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Flat 11, East Cliff Grange, 35 Knyveton Road",
      "addressLocality": "Bournemouth",
      "addressRegion": "Dorset",
      "postalCode":"BH1 3QJ"
    "geo": {
    "@type": "GeoCoordinates",
    "latitude": "50.73744",
    "longitude": "-1.8495269"

Which I can confirm works when testing it with Google's Rich Snippet Testing Tool:


This works fine with:

  • Tag Type Custom HTML
    • Trigger Type All Pages Page View

However it does not work with any of the following configurations:

  • Tag Type Custom HTML
    • Trigger Type Page View > The trigger fires on:
      1. Page URL > equals > bybe.net/about
      2. Page URL > equals > bybe.net/about/
      3. Page URL > equals > www.bybe.net/about
      4. Page URL > equals > www.bybe.net/about/

As you can see from above I have tried plenty of different URL types and its not clear what Google is expecting, Googles own examples does not use HTTP HTTPS or with WWW so I'm not sure why this is not working, hopefully someone can assist pointing me in the right direction!


1 Answer 1


Page URL is full url (including protocol) , try contains instead of equals. enter image description here

Ref : https://support.google.com/tagmanager/answer/6106965?hl=en

To check value of each built-in variable's on your page follow below listed steps :

1. Enabling Preview & Debug mode on your GTM web container

enter image description here

2. Open your website, you'll see a Quick Preview panel on bottom of your website.

3. Go to the event (Window Loaded/DOM Ready/Page View) you want your variable on and then navigate to variables tab, there you'll find all user-defined and built-in variables. Search for the variable you're looking for and there you'll find it's value listed.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.