-
Notifications
You must be signed in to change notification settings - Fork 26
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
Change dataLayer Variable Name #42
Comments
@klcodanr Now that we introduced support for pushing a function into the data layer, the
|
@jckautzmann, that would only be useful if I don't need to push things onto A more flexible solution might be to allow the consumer to provide the name of the data layer on the script element itself. Here's an example, assuming you want to support multiple data layers:
Then when the script loads, have the script pull the names of the data layers using |
@Aaronius , I would rather put that
Then we could pull the names using |
Also relates to #44 |
A proof of concept is available at: By default the
For more details: |
how to include this nodemodule @adobe/adobe-client-data-layer/dist/adobe-client-data-layer.min.js into head.html of AEM site any documentation would help a lot, I wrote <script src="adobe-client-data-layer.min.js"></script> after installing package but it doesn't work even importing in publish.entry.js doesn't help it throw error e.function not defined when I do window.addDataLAyer.getState() something none of the helper function working |
@shraddhanegi The integration of the Data Layer with AEM is explained at: https://github.com/adobe/aem-core-wcm-components/blob/master/DATA_LAYER_INTEGRATION.md |
Expected Behaviour
I may want to change the name of the dataLayer variable. For example, if an implementor already has Google Tag Manager implemented, and they are looking to implement an Adobe Client Data Layer, they will have to deal with a naming conflict between the Adobe Client Data Layer and GTM's built-in DataLayer. We have a few choices to fix this:
To support option # 3, there would need to be some way to pass a new dataLayer name to the Adobe Client Data Layer.
Actual Behaviour
There appears to be no way to chage dataLayer variable name
Reproduce Scenario (including but not limited to)
N/A
Steps to Reproduce
N/A
Platform and Version
1.0.0.beta2
Sample Code that illustrates the problem
N/A
Logs taken while reproducing problem
N/A
The text was updated successfully, but these errors were encountered: