Add Google Optimize (#92)
This commit is contained in:
parent
ce4ed5ffc5
commit
3d10812d0a
4 changed files with 12 additions and 4 deletions
|
|
@ -12,6 +12,9 @@ function initializeBaseTracking() {
|
|||
wait++;
|
||||
if (window.ga && ga.create) {
|
||||
ga('create', '<%= ENV["GA_TRACKING_ID"] %>', 'auto');
|
||||
if (!checkUserLoggedIn()) {
|
||||
ga('require', '<%= ENV["GA_OPTIMIZE_ID"] %>');
|
||||
}
|
||||
ga('send', 'pageview', location.pathname + location.search);
|
||||
clearInterval(waitingOnGA);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -758,13 +758,17 @@ header{
|
|||
}
|
||||
}
|
||||
.showpage-signin-cta{
|
||||
background: $yellow;
|
||||
background: lighten($yellow, 16%);
|
||||
border: 1px solid darken($yellow, 15%);
|
||||
box-shadow: 5px 6px 0px darken($yellow, 15%);
|
||||
width: 660px;
|
||||
max-width:90%;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
padding: 8px 5px;
|
||||
margin-bottom: 8px;
|
||||
padding: 25px 8px;
|
||||
font-size: 1.05em;
|
||||
line-height: 1.3em;
|
||||
margin-bottom: 30px;
|
||||
a{
|
||||
color: $black;
|
||||
text-decoration: underline;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% unless user_signed_in? %>
|
||||
<div class="showpage-signin-cta cta">
|
||||
<div class="showpage-signin-cta cta" id="showpage-signin-cta">
|
||||
<a href="/">dev.to</a> is a community of <%= number_with_delimiter User.all.size %> amazing humans who code.
|
||||
<a href="/enter">Register now</a>.
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ DACAST_STREAM_CODE: "REPLACEME"
|
|||
GA_SERVICE_ACCOUNT_JSON: "REPLACEME"
|
||||
GA_TRACKING_ID: "REPLACEME"
|
||||
GA_VIEW_ID: "REPLACEME"
|
||||
GA_OPTIMIZE_ID: "REPLACEME"
|
||||
|
||||
# JW player for videos on the site
|
||||
JWPLAYER_API_KEY: "REPLACEME"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue