Skip to content

Commit

Permalink
moving script out from the markup
Browse files Browse the repository at this point in the history
  • Loading branch information
fellyph committed Jan 28, 2024
1 parent 5c83a22 commit c6f75b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/demos/chips/analytics-first-party.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<h1 class="text-3xl font-bold mb-4 text-center"><%= title %></h1>
<div class="border p-8 bg-white drop-shadow-[8px_8px_0_rgba(32,33,37,.1)] rounded-lg text-center">
<p class="text-center">Track user interactions using the analytics code provided below:</p>
<script src="<%= protocol %>://<%= domainA %><% if (isPortPresent) { %>:<%= port %><% } %>/chips/analytics.js"></script>
<div class="flex justify-center space-x-4 mt-4">
<button onclick="trackInteraction('buttonClicked')" class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition duration-300">
Track me!
Expand All @@ -17,4 +16,6 @@
</div>
</div>

<script src="<%= protocol %>://<%= domainA %><% if (isPortPresent) { %>:<%= port %><% } %>/chips/analytics.js"></script>

<%- include(commonPath + '/footer.ejs') %>
4 changes: 3 additions & 1 deletion src/demos/chips/analytics-third-party.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h1 class="text-3xl font-bold mb-4 text-center"><%= title %></h1>
<div class="border p-8 bg-white drop-shadow-[8px_8px_0_rgba(32,33,37,.1)] rounded-lg text-center">
<p class="text-center">Track user interactions using the analytics code provided below:</p>
<script src="<%= protocol %>://<%= domainC %><% if (isPortPresent) { %>:<%= port %><% } %>/chips/analytics.js"></script>

<div class="flex justify-center space-x-4 mt-4">
<button onclick="trackInteraction('buttonClicked')" class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-700 transition duration-300">
Track me!
Expand All @@ -17,4 +17,6 @@
</div>
</div>

<script src="<%= protocol %>://<%= domainC %><% if (isPortPresent) { %>:<%= port %><% } %>/chips/analytics.js"></script>

<%- include(commonPath + '/footer.ejs') %>

0 comments on commit c6f75b1

Please sign in to comment.