Johan initial template#1
Open
johanesteves wants to merge 2 commits into
Open
Conversation
| ] | ||
|
|
||
|
|
||
| ___TESTS___ |
| ] | ||
|
|
||
|
|
||
| ___SANDBOXED_JS_FOR_WEB_TEMPLATE___ |
There was a problem hiding this comment.
We should have a FE person review the below to make sure it's idiomatic JS. Want to ping Dolores on it?
| }, | ||
| { | ||
| "type": "CHECKBOX", | ||
| "name": "flickerControl", |
There was a problem hiding this comment.
I noticed that we have this flicker control variable but we're pulling in chartbeat.js, not chartbeat_mab.js...do we need chartbeat_mab to make this relevant?
Dquinonez
reviewed
Dec 4, 2020
| const queryPermission = require('queryPermission'); | ||
| const createQueue = require('createQueue'); | ||
| if (queryPermission('access_globals', 'readwrite', 'dataLayer')) { | ||
| const dataLayerPush = createQueue('dataLayer'); |
There was a problem hiding this comment.
I don't think you are using this const
Dquinonez
reviewed
Dec 4, 2020
| // Enter your template code here. | ||
| const log = require('logToConsole'); | ||
| const query = require('queryPermission'); | ||
| const makeString = require('makeString'); |
Dquinonez
reviewed
Dec 4, 2020
| const injectScript = require('injectScript'); | ||
| const setInWindow = require('setInWindow'); | ||
| const copyFromWindow = require('copyFromWindow'); | ||
| const queryPermission = require('queryPermission'); |
There was a problem hiding this comment.
const query and queryPermission are the same thing
Dquinonez
reviewed
Dec 4, 2020
| const domain = data.domain; | ||
| const sections = data.sections; | ||
| const authors = data.authors; | ||
| const flickerControl = data.flickerControl; |
There was a problem hiding this comment.
If you are not using these const other than to set the _sf_async_config later... I would say just use
_sf_async_config.uid = data.uid;
_sf_async_config.domain = data.domain;
_sf_async_config.flickerControl = data.flickerControl;
_sf_async_config.sections = data.sections;
_sf_async_config.authors = data.authors;
and delete these const
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created initial template for Chartbeat's GTM Template using the instructions in the link below:
-https://developers.google.com/tag-manager/templates
-https://developers.google.com/tag-manager/templates/gallery