Skip to content

Adds eventID to Facebook Pixel #161

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tag manager can be self hosted
  • Loading branch information
alextakitani committed Jul 6, 2021
commit beb47864b03a07133dbef5c606eefe6066897f06
2 changes: 1 addition & 1 deletion lib/rack/tracker/google_global/template/google_global.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if trackers.any? %>
<script async src='https://www.googletagmanager.com/gtag/js?id=<%= trackers[0][:id] %>'></script>
<script async src='https://www.<%= options[:host].presence || 'googletagmanager' %>.com/gtag/js?id=<%= trackers[0][:id] %>'></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if container %>
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<%= container %>"
<noscript><iframe src="https://www.<%= options[:host].presence || 'googletagmanager' %>.com/ns.html?id=<%= container %>"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
"https://www.<%= options[:host].presence || 'googletagmanager' %>.com/gtm.js?id="+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<%= container %>');</script>
<% end %>