Giter Club home page Giter Club logo

cfp-relaunch's People

Contributors

mhoad avatar

Watchers

 avatar  avatar

cfp-relaunch's Issues

dataLayer needs to be initialized before container snippet

Since moving the Google Tag Manager snippet to the top of the page immediately after the <meta charset="utf-8"> tag we have broken the dataLayer implementation.

It is important that the dataLayer is initialized before the Google Tag Manager container snippet appears otherwise it won't work correctly unfortunately.

Currently all pages look like the following:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">

    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-TZRJDKZ');</script>
    <!-- End Google Tag Manager -->

I am not sure how easy it is for you to be able to initialize the dataLayer for a given page in the header but ideally it would look like the following (using The World's Fare Tour page as an example here)

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script>
      dataLayer = [{
        'ecommerce': {
          'detail': {
            'products': [{
              'name': 'The World’s Fare™',
              'id': '308295',
              'price': '59.00'
            }]
          },
          'impressions': {
            'products': [{
              'name': 'Winter Delights',
              'id': '305318',
              'price': '42.00',
              'list': 'Related Tours',
              'position': 1
            }]
          }
        }
      }];
    </script>
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-TZRJDKZ');</script>
    <!-- End Google Tag Manager -->

I can imagine that depending on how you have things implemented currently this might be somewhat difficult. Although that would be the strongly preferred approach if that is not possible you could instead just initialize an empty dataLayer before the GTM snippet like so:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script>
      dataLayer = [];
    </script>
    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-TZRJDKZ');</script>
    <!-- End Google Tag Manager -->

Then anywhere in the rest of the page itself we can simply push the relevant data into the dataLayer like so:

<script>
  dataLayer.push({
    'ecommerce': {
      'detail': {
        'products': [{
          'name': 'The World’s Fare™',
          'id': '308295',
          'price': '59.00'
        }]
      },
      'impressions': {
        'products': [{
          'name': 'Winter Delights',
          'id': '305318',
          'price': '42.00',
          'list': 'Related Tours',
          'position': 1
        }]
      }
    }
  });
</script>

Please note that this implementation makes use of the updated dataLayer specification as outlined in issue #3


Missing information in TravelAgency JSON-LD data

Since originally publishing the guidelines that we provided the specification has changed for the JSON we are using on all pages to demonstrate the business information.

  • It requires an additional image value.
  • It is also now recommended to include a priceRange.
  • While we have a description key the value is currently blank

Currently the code looks like:

<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "TravelAgency",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1564 N Damen Avenue",
        "addressLocality": "Chicago",
        "addressRegion": "IL",
        "postalCode": "60622",
        "addressCountry": "US"
      },
      "founder": {
        "@type": "Person",
        "givenName": "Shane",
        "familyName": "Kost",
        "gender": "male",
        "jobTitle": "Owner"
      },
      "openingHours": [
        "Mo-Su 08:00-17:00"
      ],
      "description": "",
      "name": "Chicago Food Planet",
      "currenciesAccepted": "USD",
      "logo": "http://chicagofoodplanet.tourandeventwebsites.com/wp-content/uploads/2017/01/SmallLogoWhiteBackground.png",
      "email": "[email protected]",
      "url": "http://chicagofoodplanet.tourandeventwebsites.com/",
      "sameAs": [
                    "http://facebook.com/ChicagoFoodPlanetFoodTours",
"http://twitter.com/ChiFoodPlanet",
"https://www.yelp.com/biz/chicago-food-planet-food-tours-chicago",
"https://www.tripadvisor.com/UserReviewEdit-g35805-d1024052-e__2F__Attraction__5F__Review__2D__g35805__2D__d1024052__2D__Reviews__2D__Chicago__5F__Food__5F__Planet__5F__Food__5F__Tours__2D__Chicago__5F__Illinois__2E__html-Chicago_Food_Planet_Food_Tours-Chicago_Illinois.html",
"https://plus.google.com/ChiFoodPlanet", 
"http://youtube.com/ChiFoodPlanet",
"http://pinterest.com/ChiFoodPlanet",
"http://instagram.com/ChiFoodPlanet"
],
      "legalName": "Chicago Food Planet, Inc",
      "telephone": "(312) 932-0800"
    }
    </script>

In order to resolve these issues we recommend the following solutions:

  • Ensure that the image value is the same as the logo value
  • Use a custom field within Wordpress to set the priceRange
  • Use a custom field within Wordpress to set the description

The updated code snippet should look like:

<script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "TravelAgency",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1564 N Damen Avenue",
        "addressLocality": "Chicago",
        "addressRegion": "IL",
        "postalCode": "60622",
        "addressCountry": "US"
      },
      "founder": {
        "@type": "Person",
        "givenName": "Shane",
        "familyName": "Kost",
        "gender": "male",
        "jobTitle": "Owner"
      },
      "openingHours": [
        "Mo-Su 08:00-17:00"
      ],
      "description": "Experience Chicago's historic, off-the-beaten-path neighborhoods through delicious local food. Our food tours are the perfect blend of culture, food & fun!",
      "name": "Chicago Food Planet",
      "currenciesAccepted": "USD",
      "logo": "http://chicagofoodplanet.tourandeventwebsites.com/wp-content/uploads/2017/01/SmallLogoWhiteBackground.png",
      "image": "http://chicagofoodplanet.tourandeventwebsites.com/wp-content/uploads/2017/01/SmallLogoWhiteBackground.png",
      "priceRange": "$$",
      "email": "[email protected]",
      "url": "http://chicagofoodplanet.tourandeventwebsites.com/",
      "sameAs": [
                    "http://facebook.com/ChicagoFoodPlanetFoodTours",
                    "http://twitter.com/ChiFoodPlanet",
                    "https://www.yelp.com/biz/chicago-food-planet-food-tours-chicago",
                    "https://www.tripadvisor.com/UserReviewEdit-g35805-d1024052-e__2F__Attraction__5F__Review__2D__g35805__2D__d1024052__2D__Reviews__2D__Chicago__5F__Food__5F__Planet__5F__Food__5F__Tours__2D__Chicago__5F__Illinois__2E__html-Chicago_Food_Planet_Food_Tours-Chicago_Illinois.html",
                    "https://plus.google.com/ChiFoodPlanet", 
                    "http://youtube.com/ChiFoodPlanet",
                    "http://pinterest.com/ChiFoodPlanet",
                    "http://instagram.com/ChiFoodPlanet"
],
      "legalName": "Chicago Food Planet, Inc",
      "telephone": "(312) 932-0800"
    }
    </script>

You can confirm that the implementation is working correctly by using Google's Structured Data Testing Tool

FoodEvent JSON-LD address values are incorrect

Using the JSON-LD data from the 3-1-Chew tour page the existing JSON-LD data looks like the following:

<script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "FoodEvent",
    "name": "3-1-Chew™",
    "duration": "03:00",
    "description": "Named after Chicago’s primary area code (312), you’ll explore food & culture from the bustling art-filled streets of Wicker Park & Bucktown.",
    "url": "http://chicagofoodplanet.tourandeventwebsites.com/tour/wicker-park-walking-tour/",
    "startDate": "2016-02-25",
    "location": {
      "@type": "Place",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1611 N Damen Ave",
        "addressLocality": " Chicago",
        "addressRegion": " IL 60647",
        "postalCode": "TBD",
        "addressCountry": " USA"
      },
      "name": "1611 N Damen Ave, Chicago, IL 60647, USA"
    },
    "organizer": {
      "@type": "Organization",
      "name": "Chicago Food Planet",
      "legalName": "Chicago Food Planet, Inc",
      "telephone": "(312) 932-0800",
      "logo": "http://chicagofoodplanet.tourandeventwebsites.com/wp-content/uploads/2017/01/SmallLogoWhiteBackground.png",
      "url": "http://chicagofoodplanet.tourandeventwebsites.com",
      "address": {
          "@type": "PostalAddress",
          "streetAddress": "1564 N Damen Avenue",
          "addressLocality": "Chicago",
          "addressRegion": "IL",
          "postalCode": "60622",
          "addressCountry": "US"
      }
    },
    "offers": {
      "@type": "AggregateOffer",
      "lowPrice": "47.00",
      "priceCurrency": "USD",
      "url": "http://chicagofoodplanet.tourandeventwebsites.com/tour/wicker-park-walking-tour/"
    }
  }
</script>

Specifically the area of concern is around:

 "location": {
      "@type": "Place",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1611 N Damen Ave",
        "addressLocality": " Chicago",
        "addressRegion": " IL 60647",
        "postalCode": "TBD",
        "addressCountry": " USA"
      }

The values should instead be:

 "location": {
      "@type": "Place",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1611 N Damen Ave",
        "addressLocality": " Chicago",
        "addressRegion": " IL",
        "postalCode": "60647",
        "addressCountry": " USA"
      }

FoodEvent JSON-LD date values are incorrect

On each of the individual food tour pages we include a snippet of JSON-LD data to provide search engines with structured data about the tour like the following example taken from the 3-1-Chew page.

<script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "FoodEvent",
    "name": "3-1-Chew™",
    "duration": "03:00",
    "description": "Named after Chicago’s primary area code (312), you’ll explore food & culture from the bustling art-filled streets of Wicker Park & Bucktown.",
    "url": "http://chicagofoodplanet.tourandeventwebsites.com/tour/wicker-park-walking-tour/",
    "startDate": "2016-02-25",
    "location": {
      "@type": "Place",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1611 N Damen Ave",
        "addressLocality": " Chicago",
        "addressRegion": " IL 60647",
        "postalCode": "TBD",
        "addressCountry": " USA"
      },
      "name": "1611 N Damen Ave, Chicago, IL 60647, USA"
    },
    "organizer": {
      "@type": "Organization",
      "name": "Chicago Food Planet",
      "legalName": "Chicago Food Planet, Inc",
      "telephone": "(312) 932-0800",
      "logo": "http://chicagofoodplanet.tourandeventwebsites.com/wp-content/uploads/2017/01/SmallLogoWhiteBackground.png",
      "url": "http://chicagofoodplanet.tourandeventwebsites.com",
      "address": {
          "@type": "PostalAddress",
          "streetAddress": "1564 N Damen Avenue",
          "addressLocality": "Chicago",
          "addressRegion": "IL",
          "postalCode": "60622",
          "addressCountry": "US"
      }
    },
    "offers": {
      "@type": "AggregateOffer",
      "lowPrice": "47.00",
      "priceCurrency": "USD",
      "url": "http://chicagofoodplanet.tourandeventwebsites.com/tour/wicker-park-walking-tour/"
    }
  }
</script>

The date associated with the tour should be tomorrows date but instead it appears to be pulling a seemingly random date in the future.

Google have updated e-commerce dataLayer specification

Google appear to have recently made a small change in how they expect the dataLayer to be structured in order to work with Google Analytics enhanced e-commerce.

Using the 3-1-Chew page as an example here the dataLayer currently looks like:

<script>
  dataLayer = [{
    'ecommerce': {
      'detail': {
        'name': '3-1-Chew™',
        'id': '19844',
        'price': '47.00'
      },
      'impressions': [{
          'name': 'Second City Classic',
          'id': '21235',
          'price': '47.00',
          'list': 'Related Tours',
          'position': 1
        },
        {
          'name': 'Chinatown Adventure',
          'id': '21308',
          'price': '55.00',
          'list': 'Related Tours',
          'position': 2
        },
      ]
    }
  }];
</script>

Google Analytics now expects products to be nested in an array of productFieldObjects like so:

<script>
  dataLayer = [{
    'ecommerce': {
      'detail': {
        'products': [{
          'name': '3-1-Chew™',
          'id': '19844',
          'price': '47.00'
        }]
      },
      'impressions': {
        'products': [{
            'name': 'Second City Classic',
            'id': '21235',
            'price': '47.00',
            'list': 'Related Tours',
            'position': 1
          },
          {
            'name': 'Chinatown Adventure',
            'id': '21308',
            'price': '55.00',
            'list': 'Related Tours',
            'position': 2
          }
        ]
      }
    }
  }];
</script>

Unable to update page metadata for some pages

It looks like I am unable to update the values for the page title or meta description tags for some pages. Would you be able to arrange for me please.

Tours Page

TItle: Chicago Walking Food Tours - Chicago Food Planet
Meta Description: Eat your way through Chicago's most delicious neighborhoods on one of our many seasonal food tours. Also learn history & culture from our expert guides!

Winter Experiences

TItle: Chicago Winter Food Tours - Winter Tours - Chicago Food Planet
Meta Description: Don't let the cold stop you from eating Chicago's best food! Our winter food tours showcase the best local food, while keeping you cozy & warm.

Spring-Fall Experiences

TItle: Chicago Spring & Fall Food Tours - Chicago Food Planet
Meta Description: Take advantage of Chicago's warm weather with a fun & delicious walking food tour. Eat great food, have fun, and learn some Windy City history!

FAQs

TItle: Frequently Asked Questions - Chicago Food Planet FAQ
Meta Description: Find detailed answers to common food tour questions in our FAQs, including topics such as dietary restrictions, substitutions, and general tour logistics.

Join The Team

TItle: Work With Us - Careers - Jobs - Chicago Food Planet
Meta Description: Do you have a passion for food and people? Then join our team of friendly staff who aim to make your food tour adventure memorable, educational and fun!

Press & Reviews

TItle: Chicago Food Planet in the Press Mentions - Chicago Food Planet
Meta Description: See all of our reviews and ratings, including our nomination as TripAdvisor's #1 food tour in Chicago and our perfect 5-star Yelp rating!

FAQ page is missing appropriate markup

None of the questions and answers on the FAQ page make use of the appropriate Schema.org markup.

The FAQ section form individual tour pages already has a correctly functioning example which you can use. For example it should be:

<div class="panel panel-default" itemscope="" itemtype="http://schema.org/Question">
  <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse4" aria-expanded="true" aria-controls="collapse4" class="">
    <div class="panel-heading" role="tab" id="heading4">
      <h4 class="panel-title" itemprop="text">Are there vegetarian options on the tour?</h4>
    </div>
  </a>
  <div id="collapse4" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading4" itemprop="acceptedAnswer" itemscope="" itemtype="http://schema.org/Answer" aria-expanded="true">
    <div class="panel-body" itemprop="text">
      <p>Yes, all tours offer alternative tasting options for vegetarians and gluten-free individuals where possible.</p>
    </div>
  </div>
</div>

You can test the implementation using Google's Structured Data Testing Tool

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.