Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
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
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,16 @@ Redirects are configured in `netlify.toml`

The site uses [iubenda](https://www.iubenda.com/) to manage tracking consent.
Copy link
Contributor

Choose a reason for hiding this comment

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

With cookies removed we can remove this line and all of the iubenda code in the footer

<div class="subfooter">

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Apply this suggestion.

Copy link
Author

Choose a reason for hiding this comment

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

Removed iubenda line from README.md and all iubenda code from footer.html including:

  • Privacy Policy and Cookie Policy links
  • Your Privacy Choices link with CCPA icon
  • Notice at Collection link
  • iubenda.js script loader

Commit: 8e69c47


Tracking scripts are loaded via [Google Tag Manager](https://tagmanager.google.com/#/container/accounts/6068072463/containers/116206463/workspaces/9)

Analytics are recorded in [Google Analytics](https://analytics.google.com/analytics/web/#/p373834203/reports/home) and [Heap](https://heapanalytics.com/app/env/4204607514/dashboard/Testcontainers-Overview-278374)
Copy link
Contributor

Choose a reason for hiding this comment

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

Analytics will no longer be recorded. If we want to keep this a link to historical data we can update this line to explain that.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Apply this suggestion.

Copy link
Author

Choose a reason for hiding this comment

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

Updated the analytics line in README.md to clarify that it links to historical data only, with a note that analytics are no longer being recorded.

Commit: 5a8b6f3


### TCD install attribution

During Testcontainers Desktop client authorization users are redirected to `https://testcontainers.com/desktop/authorized/`.

This page sends an `attribution` event to [Mixpanel](https://eu.mixpanel.com/project/2717988/view/3254192/app/events#pYPErQ1bEeiU) that links any attribution information in the users cookies (utms, referrer etc) to the client install ID.
This page sends an `attribution` event to [Mixpanel](https://eu.mixpanel.com/project/2717988/view/3254192/app/events#pYPErQ1bEeiU) that links any attribution information from the URL parameters (utms, referrer etc) to the client install ID.

The code for this page is found in `/layouts/authorized/baseof.html`.

The script that saves that attribution data to the users cookies is in the Google Tag Manager container.

## Additional Notes

### Testcontainers Slack channel link
Expand Down
44 changes: 3 additions & 41 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,29 +100,15 @@ function setQueryParam(param, value) {
// Handle UTMs
const utms = [];

const referrerCookie = getCookie("__gtm_referrer");
if (referrerCookie) {
utms.push({
key: "original_referrer",
value: referrerCookie
});
} else if (document.referrer) {
if (document.referrer) {
utms.push({
key: "original_referrer",
value: document.referrer
});
}

const campaignCookie = getCookie("__gtm_campaign_url");
if (campaignCookie) {
const url = new URL(campaignCookie);
const params = new URLSearchParams(url.search);
const cookieUtms = parseUtms(params);
utms.push(...cookieUtms);
} else {
const queryParams = parseUtms(new URLSearchParams(window.location.search));
utms.push(...queryParams);
}
const queryParams = parseUtms(new URLSearchParams(window.location.search));
utms.push(...queryParams);

function parseUtms(params) {
const utms = [];
Expand All @@ -143,17 +129,6 @@ function parseUtms(params) {
return utms;
}

function getCookie(key) {
var cookies = document.cookie.split(";");
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i].split("=");
if (key == cookie[0].trim()) {
return decodeURIComponent(cookie[1]);
}
}
return null;
}

signupLinks = document.querySelectorAll("a[href*='app.testcontainers.cloud/signup']");
signupLinks.forEach(link => {
const url = new URL(link.href);
Expand Down Expand Up @@ -231,24 +206,11 @@ async function hashText(text) {
function dismissAnnouncementBanner() {
announcementBanner.classList.remove("not-dismissed");
announcementBanner.classList.add("dismissed");
hashText(announcementBanner.innerHTML)
.then((hash) => {
localStorage.setItem("dismissedAnnouncement", hash);
});
}
const announcementBanner = document.getElementById("announcement-banner");
if (announcementBanner) {
const announcementBannerButton = document.getElementById("announcement-banner-button");
announcementBannerButton.addEventListener('click', dismissAnnouncementBanner);
hashText(announcementBanner.innerHTML)
.then((hash) => {
if (localStorage.getItem("dismissedAnnouncement") && localStorage.getItem("dismissedAnnouncement") === hash) {
announcementBanner.classList.remove("not-dismissed");
announcementBanner.classList.add("dismissed");
} else {
announcementBanner.classList.add("not-dismissed");
}
})
}

function setActiveDownloadBannerSection(id) {
Expand Down
11 changes: 0 additions & 11 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- Google Tag Manager -->
<script>(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://tag-manager.testcontainers.com/';f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5LGVXVD');</script>
<!-- End Google Tag Manager -->
{{- partial "head.html" . -}}
{{- block "pageScripts" . }}{{- end }}
</head>
Expand All @@ -29,9 +22,5 @@
{{- partial "footer.html" . -}}
{{- partial "svgs/sprite.html" -}}
{{- block "footerScripts" . }}{{- end }}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5LGVXVD"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
</body>
</html>
53 changes: 19 additions & 34 deletions layouts/authorized/baseof.html
Copy link
Contributor

Choose a reason for hiding this comment

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

With all of the client side reason for this page removed, we could add it to the redirects in netlify.toml. We may also wan't to update the TCC code to not redirect users to this page anymore.

Copy link
Member

Choose a reason for hiding this comment

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

@copilot Apply this suggestion.

Copy link
Author

Choose a reason for hiding this comment

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

Added redirect in netlify.toml to redirect /desktop/authorized/ directly to https://app.testcontainers.cloud/api/auth/login with a 302 status code. This eliminates the need for the client-side redirect page.

Commit: 5a8b6f3

Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,28 @@
if(searchParams.has('id')){
const utms = {};

const referrerCookie = getCookie("__gtm_referrer");
if (referrerCookie) {
utms.original_referrer = referrerCookie;
if (document.referrer) {
utms.original_referrer = document.referrer;
}

const campaignCookie = getCookie("__gtm_campaign_url");
if (campaignCookie) {
const url = new URL(campaignCookie);
utms.utm_landing_page = `${url.hostname}${url.pathname}`;
const params = new URLSearchParams(url.search);
const keys = [
"utm_campaign",
"utm_source",
"utm_medium",
"utm_term",
"utm_content"
]
keys.forEach(key => {
const value = params.get(key) || false;
if (value) {
utms[key] = value;
}
});
}

const firstTouch = getCookie("__gtm_first_touch");

function getCookie(key) {
var cookies = document.cookie.split(";");
for(var i = 0; i < cookies.length; i++) {
var cookie = cookies[i].split("=");
if(key == cookie[0].trim()) {
return decodeURIComponent(cookie[1]);
}
const url = new URL(window.location.href);
const params = new URLSearchParams(url.search);
const keys = [
"utm_campaign",
"utm_source",
"utm_medium",
"utm_term",
"utm_content"
]
keys.forEach(key => {
const value = params.get(key) || false;
if (value) {
utms[key] = value;
}
return null;
});

if (url.search) {
utms.utm_landing_page = `${url.hostname}${url.pathname}`;
}

mixpanel.init("{{- $mixpanelToken -}}", {
Expand All @@ -73,7 +59,6 @@
"attribution",
{
installation_id: searchParams.get("id"),
first_touch: firstTouch,
raw_utms: utms,
...utms
},
Expand Down