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

Allow different vendor #170

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

MegEdnazednav
Copy link

Hello,
This change goes together with the PR made in https://github.com/tomoyukikashiro/gatsby-plugin-html2amp/pull/73

Copy link
Owner

@t-jindai t-jindai 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 your contribution !
Could you check my feedback ?

@@ -45,7 +45,7 @@ console.log(amp) // amp string
## Options

name | default value | note
------------ | ------------- | -------------
------------ | ------------- | -------------
Copy link
Owner

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>`)
Copy link
Owner

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 ?

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.

2 participants