Successfully reported this slideshow.
Your SlideShare is downloading. ×

SMX London: Google Tag Manager Can Do What?

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 76 Ad

More Related Content

Similar to SMX London: Google Tag Manager Can Do What? (20)

Advertisement

Recently uploaded (20)

SMX London: Google Tag Manager Can Do What?

  1. 1. #SMX #24B @SWallaceSEO Stephanie Wallace, Vice President, Owned Media, Nebo Google Tag Manager Can Do What? G O I NG ABO VE & BEYO ND CO NVERSI O N TRACKI NG
  2. 2. #SMX #24B @SWallaceSEO We are going to cover a lot!
  3. 3. #SMX #24B @SWallaceSEO Google Tag Manager: The best only way to deploy Analytics tracking.
  4. 4. #SMX #24B @SWallaceSEO But, we’re not going to cover the basics.
  5. 5. #SMX #24B @SWallaceSEO Are we using GTM to it’s full potential?
  6. 6. #SMX #24B @SWallaceSEO GTM allows you to make changes to code on your site…
  7. 7. #SMX #24B @SWallaceSEO Without touching your site’s code.
  8. 8. #SMX #24B @SWallaceSEO Puts us, the marketers, back in control.
  9. 9. #SMX #24B @SWallaceSEO We’re not relying on developers*.
  10. 10. #SMX #24B @SWallaceSEO We’re not relying on developers*. *Caveat: Developers have a process for a reason…
  11. 11. #SMX #24B @SWallaceSEO Special features make GTM a game changer.
  12. 12. #SMX #24B @SWallaceSEO 7 SEO Specific Tactics to Leverage GTM
  13. 13. #SMX #24B @SWallaceSEO Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time We’ll Review How To:
  14. 14. #SMX #24B @SWallaceSEO We’ll Review How To: Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time
  15. 15. #SMX #24B @SWallaceSEO We’ll Review How To: Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time
  16. 16. #SMX #24B @SWallaceSEO We’ll Review How To: Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time
  17. 17. #SMX #24B @SWallaceSEO We’ll Review How To: Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time
  18. 18. #SMX #24B @SWallaceSEO We’ll Review How To: Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time
  19. 19. #SMX #24B @SWallaceSEO We’ll Review How To: Add Structured Data Markup Implement Custom Header Tags Implement Canonical Tags Define Metadata Track Right Clicks Measure Scroll Depth Measure Dwell Time
  20. 20. #SMX #24B @SWallaceSEO Add Structured Data Markup
  21. 21. #SMX #24B @SWallaceSEO Use Schema to annotate elements on a page making it easier for search engines to understand your content. Structured Data Markup
  22. 22. #SMX #24B @SWallaceSEO Create your snippet of Schema in J-SON LD format. Example: Organization Schema
  23. 23. #SMX #24B @SWallaceSEO Create a new tag using the Custom HTML type. Implementation
  24. 24. #SMX #24B @SWallaceSEO Paste the schema markup into GTM to dynamically insert J-SON LD on all pages you define. Implementation: Tag Configuration
  25. 25. #SMX #24B @SWallaceSEO Define your trigger pages for this code to fire on. Depends on the type of Schema you’re implementing. Click Save and Publish your changes. Implementation: Trigger Configuration
  26. 26. #SMX #24B @SWallaceSEO Verify via Google’s Structured DataTestingTool. Testing & QA
  27. 27. #SMX #24B @SWallaceSEO Implement Custom Header Tags
  28. 28. #SMX #24B @SWallaceSEO Implement directives via GTM to control crawling & indexing with the robots meta tags. Custom Header Tags Directive noindex Meaning nofollow noarchive noodp nosnippet Do not show this page in search results Do not follow the links on this page Do not show a “Cached” link in search results Do not show a text snippet or video preview in SERPs Do not use business info from Open Directory Project
  29. 29. #SMX #24B @SWallaceSEO Implement header tags with JavaScript by creating a new tag using the custom HTML type. Implementation
  30. 30. #SMX #24B @SWallaceSEO Paste your code and specify within the JavaScript to fire code in the head section. Implementation: Tag Configuration
  31. 31. #SMX #24B @SWallaceSEO Define a new trigger that specifies the page(s) to which the header tag will apply. Implementation: Trigger Configuration
  32. 32. #SMX #24B @SWallaceSEO Verify that the tag is firing usingView Source or via Chrome DevTools. Testing & QA
  33. 33. #SMX #24B @SWallaceSEO Implement Canonical Tags
  34. 34. #SMX #24B @SWallaceSEO Canonical Tags Use custom variables in GoogleTag Manager to create auto generated canonical URLs for every page. rel=“canonical” Canonical version Duplicate version Parameter version
  35. 35. #SMX #24B @SWallaceSEO Create variables for the Page URL Canonical, Page Protocol, Page Hostname Canonical, & Page Path. Implementation: Start with Variables
  36. 36. #SMX #24B @SWallaceSEO Protocol https://www.example.com/products/?s=seo101#results Hostname Path Query Fragment Quick refresher on URL components these variables are referencing. Implementation
  37. 37. #SMX #24B @SWallaceSEO Again, using the custom HTML tag copy and paste this code. Set code to fire code in the head section. Trigger should fire on all pages. Implementation: Tag Configuration
  38. 38. #SMX #24B @SWallaceSEO Verify the tag via Chrome DevTools. Testing & QA
  39. 39. #SMX #24B @SWallaceSEO Implement Metadata
  40. 40. #SMX #24B @SWallaceSEO Metadata Add title tags and meta descriptions to your site when this cannot be done any other way. <title>ExampleTitle</title> <meta name="description" content="This is an example of a meta description.">
  41. 41. #SMX #24B @SWallaceSEO For a single page, implement the JavaScript as a Custom HTML tag, specified to fire in the head section. Implementation: Tag Configuration
  42. 42. #SMX #24B @SWallaceSEO Implementation: Tag Configuration Does it have to be this manual? For a single page, implement the JavaScript as a Custom HTML tag, specified to fire in the head section.
  43. 43. #SMX #24B @SWallaceSEO Add title tags and meta descriptions to your site in bulk usingVariable LookupTables. Alternate Implementation: Create a New Variable
  44. 44. #SMX #24B @SWallaceSEO Testing & QA This is admittedly pretty hacky… But sometimes it’s the only way.
  45. 45. #SMX #24B @SWallaceSEO Track Right Clicks
  46. 46. #SMX #24B @SWallaceSEO Track Right Clicks Track right or middle clicks with custom tags to truly measure the number of events on a website. Users often right click to download or open in a new tab.
  47. 47. #SMX #24B @SWallaceSEO Create a Click ListenerTag using JavaScript to fire on all non-left clicks on links. Set the trigger to DOM ready pageview. The page is now “listening” for the mousedown action from a right or middle click. Implementation: Tag Configuration
  48. 48. #SMX #24B @SWallaceSEO Create data layer variables to match the variables to be sent by the listener tag. Implementation: Create Variables
  49. 49. #SMX #24B @SWallaceSEO Define a new Custom Event trigger ready for ourGoogle Analytics tag to track users clicking on non-left button links, right-button links, and middle-button links. Implementation: Trigger Configuration
  50. 50. #SMX #24B @SWallaceSEO Create a new Universal Analytics event tracking tag to fire on all right-clicked links. Use the defined variables to set up the event and the defined non-left trigger. Now you’re tracking in Google Analytics! Implementation: Tracking in Google Analytics
  51. 51. #SMX #24B @SWallaceSEO Testing & QA Testing has shown we are missing somewhere between 1/3 and 1/2 of all clicks on a variety of links and resources.
  52. 52. #SMX #24B @SWallaceSEO Measure Scroll Depth
  53. 53. #SMX #24B @SWallaceSEO Capture how far down a given page users scroll to improve engagement tracking. Measure Scroll Depth
  54. 54. #SMX #24B @SWallaceSEO Use the native Scroll Depth trigger in GTM. Implementation: Define New Trigger
  55. 55. #SMX #24B @SWallaceSEO Create a trigger based on vertical or horizontal scroll depths of 25%*, 50%, 75% and 100%. Define pages on which to fire. *The 25% mark will cause bounce rate to artificially decrease. Implementation: Trigger Configuration
  56. 56. #SMX #24B @SWallaceSEO Create a Universal Google Analytics event tag to collect scroll tracking data. Use the Scroll Depth trigger we just defined. Implementation: Tag Configuration
  57. 57. #SMX #24B @SWallaceSEO Testing & QA To avoid affecting your site’s bounce rate, when creating events in GTM configure the “non-interaction” field asTRUE for 25%. Or choose to exclude 25% from the trigger altogether. 25% 50% 75% 100%
  58. 58. #SMX #24B @SWallaceSEO Measure Dwell Time
  59. 59. #SMX #24B @SWallaceSEO Use theTimer trigger to measure quality visits based on dwell time rather than average time on page. Measure Dwell Time Trigger Fires After X Seconds GTM Tag Fires, Event Passes to Analytics Visitor Enters
  60. 60. #SMX #24B @SWallaceSEO Create theTimer trigger. Define milliseconds between events and set a limit on number events to be fired. Ideal to specify content heavy pages, similar to scroll depth. Implementation: Trigger Configuration
  61. 61. #SMX #24B @SWallaceSEO Calculate ideal dwell time intervals per page based on number of words on the page. Implementation: Trigger Configuration words on the page 15 * 1000 150 words on the page 15 * 1000 = 10 second intervals
  62. 62. #SMX #24B @SWallaceSEO Use thoseTimer triggers to create Create a Universal Google Analytics event tag to collect scroll tracking data. Define event tracking parameters. Select “Enable override settings in this tag”. Implementation: Tag Configuration
  63. 63. #SMX #24B @SWallaceSEO Testing & QA Confirm the tag data is firing in GoogleAnalytics.
  64. 64. #SMX #24B @SWallaceSEO We covered a lot!
  65. 65. #SMX #24B @SWallaceSEO We covered a lot! http://bit.ly/SMX-GTM
  66. 66. #SMX #24B @SWallaceSEO Share these #SMXInsights on your social channels! #SMXInsights We know that a large portion of metrics from Google Analytics are either bullsh*t, spam or plain wrong GTM can help improve the quality of metrics we’re tracking
  67. 67. #SMX #24B @SWallaceSEO Share these #SMXInsights on your social channels! #SMXInsights Google Tag Manager loads JavaScript • Google may crawl these changes on a page, but they are not the only search engine Remember these are hacks
  68. 68. #SMX #24B @SWallaceSEO Share these #SMXInsights on your social channels! #SMXInsights Google Tag Manager Resources: • Simo Ahava • LunaMetrics GTM Recipes • Moz Blog: SEO Changes Using GTM
  69. 69. #SMX #24B @SWallaceSEO Google Tag Manager is a game changer.
  70. 70. #SMX #24B @SWallaceSEO Thank You! Stephanie Wallace Vice President, Owned Media Nebo LEARN MORE: UPCOMING @SMX EVENTS See You at the next #SMX!
  71. 71. #SMX #24B @SWallaceSEO Supplement: Custom Code Examples
  72. 72. #SMX #24B @SWallaceSEO Structured Data Markup Code <script type="application/ld+json"> { "@context":"http://schema.org", "@type": "Organization", "name": "NeboAgency", "sameAs": [ "www.neboagency.com", "https://www.facebook.com/NeboWeb/", "https://twitter.com/neboagency", "https://www.linkedin.com/company/nebo-agency/" ], "brand": "Nebo", "description": "Nebo is a full-service agency headquartered in Atlanta,GA.We believe great work comes from a deep understanding the needs, wants and desires of your audience. Discover more about Nebo and our human-centered philosophy.", "address": { "@type": "PostalAddress", "addressLocality": "Atlanta", "addressRegion": "GA", "postalCode": "30318", "streetAddress": "1000 MARIETTA ST NW SUITE 270" }, "telephone": "1.800.908.6326", } </script>
  73. 73. #SMX #24B @SWallaceSEO Custom Header Tags / NOINDEX Code <script> jQuery('meta[name="robots"]').remove(); Var meta = document.createElement ('meta'); meta .name = "robots"; Meta.content = "noindex"; docuemnt.getElementsByTagName('head')[0].appendChild(meta); </script>
  74. 74. #SMX #24B @SWallaceSEO Canonical Tag Code <script> var c = document.createElement('link'); c.; c.href = {{Page URL Canonical}}; document.head.appendChild(c); </script>
  75. 75. #SMX #24B @SWallaceSEO Metadata Code <script> jQuery('meta[name="description"]').remove(); jQuery((title').remove(); var md_en = document.createElement('meta'); md_en.name = 'description'; md_en.content - 'This is a test for Metadata replacement with GTM.'; jQuery('head').append(md_en); var tt_en = document.createElement('title'); tt_en.text = 'GoogleTag Manager Can Do What? | SMX'; jQuery('head').append(tt_en); </script>
  76. 76. #SMX #24B @SWallaceSEO Right Click Code <script type='text/javascript'> if (window.jQuery) { jQuery('a').mousedown(function(event) { if (event.which == 3) dataLayer.push({ "nonleft.linkclick.href": this.href, "nonleft.linkclick.linktext": this.text, "event": "nonleft.linkclick.right"}); if (event.which == 2) dataLayer.push({ "nonleft.linkclick.href": this.href, "nonleft.linkclick.linktext": this.text, "event": "nonleft.linkclick.middle"}); }); } </script>

Editor's Notes

  • I am going to assume you already know & love tag manager
    And we’re not going to cover how to write javascript
  • Things like version control, security, avoiding collection of PII, etc…
  • Special features like real time testing and the ability to customize make GTM a game changer.
  • Implement Schema in JSON-LD format via Google Tag Manager.
  • For anyone not familiar, Schema is a structured data markup that helps search engines better understand your content
    Schema is the vocabulary, Schema.org is the dictionary.
    Historically, this code was added inline.
  • Using Schema.org, create your snippet of Schema in J-SON LD format.
  • Implement structured data markup using Google Tag Manager.
    Be sure to name your tags appropriately to easily keep track
  • Paste the schema markup that you have already written into GTM to dynamically insert J-SON LD on all pages you define.
  • And define your trigger - which pages you want this code to fire on. For something like standard organization schema we can select All Pages
    And Click Save!
    And of course, don’t forget to Publish your changes.
  • Once live, you can easily check to see that it’s firing correctly using Google’s structured data testing tool. 
    There is no easier way to implement additional code on your site
    A single script for thousands of pages with the same data type.
  • Implement noindex tags, nofollow tags & more via Google Tag Manager.
  • Implement noindex tags, canonical tags & more when inline edits aren’t feasible.
    Noindex, nofollow, noarchive, canonical, even NOODP when that was a thing
    Historically, these were changes that had to be made inline – edits to the live code on your site. But not anymore.

  • Start by selecting “New Tag” and name it so you can easily track all of the different tags on your site
    the type will be a custom HTML tag - b/c we want to add a snippet of custom code to the header of each page.
  • Simply Copy/paste the schema markup that you have written
    Specify within the Javascript to fire code in the head section.
  • And define your trigger - which pages you want this code to fire on. For something like standard organization schema we can select All Pages
    And Click Save! And of course, don’t forget to Publish your changes.
    Be cautious with the trigger here – you don’t want to accidentally NOINDEX your whole site!
  • Once live, you can easily check to see that it’s firing correctly using Google’s structured data testing tool. 
    There is no easier way to implement additional code on your site
    A single script for thousands of pages with the same data type.
  • Implement auto-generated, sitewide canonical tags via Google Tag Manager.
  • Define www or not in hostname
    Define HTTP or HTTPS
    Remove query parameters
  • Simply Copy/paste the schema markup that you have written
  • Add title tags and meta descriptions to your site via GTM.
  • This is made possible by Google’s recent advancements in rendering client-side scripting, but keep in mind that there’s a big ”if” here. You can use GTM to update your metadata, IF your site doesn’t have a lot of other JavaScript complexity going on. Google’s only going to deal with so much JavaScript before it moves on, so it’s the simpler websites that can get away with this.
  • Simply Copy/paste the schema markup that you have written
    The trigger is that page with which you are updating…
  • Simply Copy/paste the schema markup that you have written
    For a single page
  • This is admittedly pretty hacky…and John Mueller has cautioned against it. But sometimes it’s the only way.
    you didn’t have CMS access, or, worse yet, your client was using a homegrown website that couldn’t be easily updated
  • Track right or middle clicks to truly measure the number of events on a website.
  • Built in Click Triggers in GTM only track traditional clicks and linkclicks.
    Track right or middle clicks to truly measure the number of events on a website.
  • DOM ready pageview - DOM ready trigger fires when browser has built the skeleton of the page = parsed HTML and CSS. So the page may not look that good yet, but there is something rendered to a page.
  • The Regex is because in the Listener Tag – you are listening for both right and middle clicks. The Regex will capture both.
  • The Regex is because in the Listener Tag – you are listening for both right and middle clicks. The Regex will capture both.
  • Measure engagement that matters with scroll depth.
  • Capture how far down a given page users scroll to improve engagement tracking.
    Get more insight than standard time on page metrics.
    Ideal for content heavy pages.
    How users are really interacting with your content, even if they bounce.

  • This works best when content fills most of the page, top to bottom
    Set for content heavy pages
    *The 25% mark will cause bounce rate to artificially decrease as “non-sticky” users may trigger an event.

  • You have to think about the average length of content – if users don’t scroll at all will the 25% event fire anyway?
  • Measure interaction with your content beyond bounce rate.
  • Use the Timer trigger to measure quality visits based on dwell time rather than average time on page.
    Often, quality visits may still be considered a bounce with traditional measurement.
  • This works best when content fills most of the page, top to bottom
    Set for content heavy pages
  • 5 seconds, 15 seconds?
  • If I leave you with one thing – I hope it’s the thought that Google Tag Manager can be a Game Changer for you.

×