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(landing): track with google analytics if $GOOGLE_ANALYTICS is set #764

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

blacha
Copy link
Member

@blacha blacha commented Jun 10, 2020

No description provided.

Comment on lines 36 to 41
</script>
</html>`;

// Put the tracking at the bottom of the index.html
const outputHtml = rawIndexHtml.toString().replace('</html>', trackingCode);
await fs.writeFile('./static/index.html', outputHtml);
Copy link
Contributor

Choose a reason for hiding this comment

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

A script tag can't go directly into an html tag

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean it "can" and it works in both chrome and firefox, ideally i guess it should live inside the head tag with a "defer"

@blacha blacha force-pushed the feat/google-analytics-tracking branch from c502e86 to e8939de Compare June 10, 2020 23:29
@kodiakhq kodiakhq bot merged commit afc7b8e into master Jun 10, 2020
@kodiakhq kodiakhq bot deleted the feat/google-analytics-tracking branch June 10, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants