Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Add noAnalytics property to suppress GA on a page.
Browse files Browse the repository at this point in the history
Fix #1708, remove GA from the creating page
  • Loading branch information
ianb committed Oct 6, 2016
1 parent 75644a1 commit 00a3661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions server/src/pages/creating/model.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
exports.createModel = function (req) {
let finishedUrl = `/${encodeURIComponent(req.params.id)}/${encodeURIComponent(req.params.domain)}`;
let model = {
noAnalytics: true,
title: `Creating ${req.query.title}`,
docTitle: req.query.title,
docUrl: req.query.url,
Expand Down
4 changes: 2 additions & 2 deletions server/src/reactruntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ exports.HeadTemplate = class HeadTemplate extends React.Component {
<title>{this.props.title}</title>
<link rel="icon" type="image/png" href={this.props.staticLink("img/pageshot-icon-32.png")} />
<link rel="shortcut icon" href={this.props.staticLink("img/pageshot-icon-32.png")} />
<script src="//www.google-analytics.com/analytics.js" async />
<script src="/ga-activation.js" />
{ this.props.noAnalytics ? null : <script src="//www.google-analytics.com/analytics.js" async /> }
{ this.props.noAnalytics ? null : <script src="/ga-activation.js" /> }
{this.props.children}
</head>
);
Expand Down

0 comments on commit 00a3661

Please sign in to comment.