Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-plugin-google-tagmanager): Add plugin option for custom dataLayer name #12783

Merged
merged 3 commits into from
Mar 25, 2019
Merged

feat(gatsby-plugin-google-tagmanager): Add plugin option for custom dataLayer name #12783

merged 3 commits into from
Mar 25, 2019

Conversation

spwisner
Copy link
Contributor

@spwisner spwisner commented Mar 23, 2019

Description

This pull request provides a plugin option that will make data in a renamed dataLayer accessible (see #12782 for details). The value assigned to "dataLayerName" is simply the renamed dataLayer (e.g. "bzDataLayer"). Then, any data pushed to a renamed dataLayer (e.g. "bzDataLayer") will also be pushed to dataLayer, thereby making it accessible through a standard GTM configuration.

Related Issues

Addresses #12782

Copy link
Contributor

@sidharthachatterjee sidharthachatterjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this @spwisner

Left a small comment!

@sidharthachatterjee sidharthachatterjee changed the title Plugin option to access renamed dataLayer for gatsby-plugin-google-tagmanager feat(gatsby-plugin-google-tagmanager): Add plugin option for custom dataLayer name Mar 25, 2019
@sidharthachatterjee sidharthachatterjee merged commit 4a149c7 into gatsbyjs:master Mar 25, 2019
@gatsbot
Copy link

gatsbot bot commented Mar 25, 2019

Holy buckets, @spwisner — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (Currently we’ve got a couple t-shirts available, plus some socks that are really razzing our berries right now.)
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@sidharthachatterjee
Copy link
Contributor

Published in gatsby-plugin-google-tagmanager@2.0.11

DSchau pushed a commit that referenced this pull request Mar 28, 2019
…ed (#12920)

<!--
  Have any questions? Check out the contributing docs at https://gatsby.dev/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description

<!-- Write a brief description of the changes introduced by this PR -->
For the `gatsby-plugin-google-tagmanager` this PR/release: #12783, has introduced a bug where by default the `'dataLayer'` is being set to `'datalayer'` (all lower case). Which means that by default this will not work with GTM. This PR just updates to use the correct form, `dataLayer` as the default. It is possibly the smallest PR I've ever made, but it will prevent a lot of people from being confused why they can't push to the dataLayer... 

## Related Issues
issue i filed for this: 
#12921
blairmcclenny pushed a commit to brandsoulmates/gatsby-plugin-google-tag-manager-ayz that referenced this pull request Apr 14, 2021
…ed (#12920)

<!--
  Have any questions? Check out the contributing docs at https://gatsby.dev/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description

<!-- Write a brief description of the changes introduced by this PR -->
For the `gatsby-plugin-google-tagmanager` this PR/release: gatsbyjs/gatsby#12783, has introduced a bug where by default the `'dataLayer'` is being set to `'datalayer'` (all lower case). Which means that by default this will not work with GTM. This PR just updates to use the correct form, `dataLayer` as the default. It is possibly the smallest PR I've ever made, but it will prevent a lot of people from being confused why they can't push to the dataLayer... 

## Related Issues
issue i filed for this: 
gatsbyjs/gatsby#12921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants