-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow different vendor #170
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution !
Could you check my feedback ?
@@ -45,7 +45,7 @@ console.log(amp) // amp string | |||
## Options | |||
|
|||
name | default value | note | |||
------------ | ------------- | ------------- | |||
------------ | ------------- | ------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add description about the new option here?
@@ -4,7 +4,7 @@ const googleanalytics = ($, options) => { | |||
if (options.gaConfigPath) { | |||
const config = utils.getRelativeFile(options.gaConfigPath, options.cwd) | |||
const $script = $('<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js" />') | |||
const $config = $(`<amp-analytics type="googleanalytics"/><script type="application/json">${config}</script></amp-analytics>`) | |||
const $config = $(`<amp-analytics type=${options.vendor}><script type="application/json">${config}</script></amp-analytics>`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, vender
option might be ambiguous. 🤔 User may think what kind of vender it is.
How about analyticsVendor
?
Hello,
This change goes together with the PR made in https://github.com/tomoyukikashiro/gatsby-plugin-html2amp/pull/73