Skip to content

Add required scripts#678

Merged
AvdLee merged 7 commits intonew-websitefrom
new-website--add-required-scripts
Apr 3, 2025
Merged

Add required scripts#678
AvdLee merged 7 commits intonew-websitefrom
new-website--add-required-scripts

Conversation

@ngnijland
Copy link
Copy Markdown
Collaborator

@ngnijland ngnijland commented Apr 2, 2025

This PR adds the following:

  • Adds the Google Tag Manager script
  • Subscription confirmed notification
  • Script to determine ct query param for app store url
  • Plausible
    • Event: plausible-event-name=Explore+Team+Insights on Explore Team Insights button
    • Event: plausible-event-name=App+Store+Install on Download now button
    • Event: Stored Referer after running the script to determine ct

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@AvdLee when is this notification triggered? I tried testing it by subscribing to the newsletter via the form on the home page. However, I then get the following success notification:

CleanShot 2025-04-02 at 10 23 58@2x

I an external site or app redirecting to https://rocketsim.app?show_email_confirmation=1?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes, when you sign up to the form you've used as well, you'll get an email to confirm your email address. Once you click the button in that email, you'll go to https://rocketsim.app?show_email_confirmation=1

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ah wait, I get your confusion now, the copy is odd! This is the actual scenario:

  1. Someone receives SwiftLee Weekly
  2. Clicks inside the newsletter on "Join RocketSim newsletter"
  3. Navigates to https://rocketsim.app?show_email_confirmation=1 as a confirmation
  4. Opens their email to confirm etc.

Comment on lines +48 to +76
<!-- Google Tag Manager -->
<script is:inline>
(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);
})(window, document, "script", "dataLayer", "GTM-59LFW4F4");
</script>
<!-- End Google Tag Manager -->

<!-- Plausible -->
<script
is:inline
defer
data-domain="rocketsim.app"
src="https://plausible.io/js/script.tagged-events.js"></script>
<script>
window.plausible =
window.plausible ||
function () {
(window.plausible.q = window.plausible.q || []).push(arguments);
};
</script>
<!-- End Plausible -->
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@AvdLee These scripts are added to all pages, including the privacy and terms pages. Is that okay?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

It is!

@ngnijland
Copy link
Copy Markdown
Collaborator Author

@AvdLee question: do we need to haul over the LinkedIN script that is used on the team insights page of the old website? (Lines)

@ngnijland ngnijland requested a review from AvdLee April 2, 2025 09:27
@ngnijland ngnijland marked this pull request as ready for review April 2, 2025 09:27
@AvdLee
Copy link
Copy Markdown
Owner

AvdLee commented Apr 3, 2025

@AvdLee question: do we need to haul over the LinkedIN script that is used on the team insights page of the old website? (Lines)

Nope, don't think so! We should be able to rely on GTag solely. Let's just go with this PR and fix if we run into issues afterwards. It's good to start with a clean slate ✨

@AvdLee AvdLee merged commit 8c811dd into new-website Apr 3, 2025
1 check passed
@AvdLee AvdLee deleted the new-website--add-required-scripts branch April 3, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants