How to format these rich snippets?

So, I have the code below that works great when entering the Google Rich Snippet Testing Tool . The problem is that I don't need the Venue Name associated with any url. However, when I take out the a tag and simplify this line only to <span itemprop="name">Venue Name</span> , the test tool tells me that the page does not contain extended snippet markup. In addition, it issues a warning similar to this:

 Warning: Event urls are pointing to a different domain than the base url. 

Is there a way that the name of the object is not associated with anything?

Basically, I just want the result to look like this (with reference only to the “buy tickets” part):

February 2 - Phoenix, AZ - Crescent - Buy tickets

I have downloaded the html file that I am testing and enter the test tool here .

 <div itemscope itemtype="http://schema.org/MusicGroup"> <h1 itemprop="name">Name</h1> <div itemprop="events" itemscope itemtype="http://schema.org/Event"> <meta itemprop="startDate" content="2012-02-02">Date &mdash; <span itemprop="location">City, State</span> - <a href="/tour" itemprop="url"> <span itemprop="name">Venue Name</span> </a> - <a href="http://ticketlink.com" itemprop="offers">Buy tickets</a> </div> </div> 

2/16 - updated code

 <div itemscope itemtype="http://schema.org/MusicEvent"> <h1 itemprop="name">Name</h1> <div itemprop="events" itemscope itemtype="http://schema.org/Event"> <meta itemprop="startDate" content="2012-02-02">Date &mdash; <span itemprop="location" itemscope itemtype="http://schema.org/Place"> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="addressLocality">City</span>, <span itemprop="addressRegion">State</span> </span>- <span itemprop="name">Venue Name</span> - <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <a href="http://ticketlink.com" itemprop="url">Buy tickets</a> </div> </span> </div> </div> 

2/17 - updated code

 <div itemscope itemtype="http://schema.org/MusicGroup"> <h1 itemprop="name">Name</h1> <div itemprop="events" itemscope itemtype="http://schema.org/MusicEvent"> <meta itemprop="startDate" content="2012-02-02">Date &mdash; <span itemprop="location" itemscope itemtype="http://schema.org/Place"> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="addressLocality">City</span>, <span itemprop="addressRegion">State</span> </span>- <span itemprop="name">Venue Name</span> - <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <a href="http://ticketlink.com" itemprop="url">Buy tickets</a> </div> </span> </div> </div> 

2/17 - new updated code

 <div itemscope itemtype="http://schema.org/MusicGroup"> <h1 itemprop="name">Name</h1> <div itemprop="events" itemscope itemtype="http://schema.org/MusicEvent"> <meta itemprop="startDate" content="2012-02-02">Date &mdash; <span itemprop="location" itemscope itemtype="http://schema.org/Place"> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="addressLocality">City</span>, <span itemprop="addressRegion">State</span> </span>- <span itemprop="name">Venue Name</span> - </span> <div itemprop="offers"> <a href="http://ticketlink.com" itemprop="url">Buy tickets</a> </div> </div> </div> 
+4
source share
2 answers

Here are a few things that I see here.

  • If I don’t understand, this is a musical event, so you should probably use the more specific itemtype = "http://schema.org/MusicEvent" element.

  • The item item itemprop must also be the itemtype http://schema.org/Place or http://schema.org/PostalAddress . This will also solve the problem named itemprop. For example:

     <span itemprop="location" itemscope itemtype="http://schema.org/Place> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress> <span itemprop="addressLocality">City</span>, <span itemprop="addressRegion">State</span> </span> <span itemprop="name">Venue Name</span> </span> 

    See my next paragraph on why I didn’t provide a URL.

  • The offer property is another type of itemtype, so you need something like this:

     <div itemprop="offers" itemscope itemtype="http://schema.org/Offer> <a href="http://ticketlink.com" itemprop="url">Presale tickets</a> </div> 

    However, I'm not quite sure that you can have a link to another domain in the url itemprop. This is undocumented, but I have not yet seen an example of what it does. You may need to decline the offer of itemprop and simply allow Google to enter ticket information from the channels themselves.

  • See my answer to your other question about how these rich fragments of the fragments you are trying to play actually fill in the search results.

UPDATE: Below is a snippet of code that passes the test tool

 <div itemscope itemtype="http://schema.org/MusicGroup"> <h1 itemprop="name">Name</h1> <div itemprop="events" itemscope itemtype="http://schema.org/MusicEvent"> <meta itemprop="startDate" content="2012-02-02">Date &mdash; <span itemprop="name">Event Name</span> <span itemprop="location" itemscope itemtype="http://schema.org/Place"> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="addressLocality">City</span>, <span itemprop="addressRegion">State</span> </span>- <span itemprop="name">Venue Name</span> - </span> <a href="http://ticketlink.com" itemprop="offers">Buy tickets</a> </div> </div> 
+5
source

I had the same problem as you. Formatting looks good to me; however, it seems that Google is somehow “posting” event lists where the URL is different from the domain the page is hosted on. I just noticed this problem on a site that I also manage.

I contacted Google to find out what the problem is. In the extremely unlikely likelihood that the actual person will respond to my request, I will clarify my answer here with additional information.

+1
source

Source: https://habr.com/ru/post/1395423/


All Articles