Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
} else if (a.classList.contains('discovery-link')) {
gtag('event', 'discovery_nav_click', { guide: a.getAttribute('data-guide') || 'catalog', origin: 'homepage' });
} else if (a.classList.contains('app-card')) {
gtag('event', 'app_view', { app: href.replace(/^support\//, '').replace(/\/$/, '') });
gtag('event', 'app_detail_click', { app_slug: href.replace(/^support\//, '').replace(/\/$/, ''), placement: 'homepage_card' });
} else if (/pickly\.blog|toolify365\.com|fxea365\.com/.test(href)) {
gtag('event', 'crosspromo_click', { link_url: href });
}
Expand Down
3 changes: 3 additions & 0 deletions scripts/check_growth_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def check(path, key, valid):
check("/", "current_meta", "SK Apps | Mobile Apps, Games & Everyday Tools" in home)
check("/", "no_stale_store_count", "92 Apps on Google Play" not in home)
check("/", "analytics", "G-5Z588FVC81" in home)
check("/", "homepage_card_click_semantics",
"gtag('event', 'app_detail_click'" in home and
"gtag('event', 'app_view'" not in home)
for slug in FEATURED_SLUGS:
check("/", f"featured_{slug}", f'href="support/{slug}/"' in home)

Expand Down
12 changes: 11 additions & 1 deletion scripts/test_growth_live.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def valid_pages():
pages = {path: "" for path in PATHS}
pages["/"] = "SK Apps | Mobile Apps, Games & Everyday Tools G-5Z588FVC81 " + " ".join(
pages["/"] = "SK Apps | Mobile Apps, Games & Everyday Tools G-5Z588FVC81 gtag(\'event\', \'app_detail_click\' " + " ".join(
f'href="support/{slug}/"' for slug in FEATURED_SLUGS)
packages = [f"jp.appdevelopsk.testapp{i}" for i in range(92)]
cards = " ".join(
Expand Down Expand Up @@ -119,6 +119,16 @@ def test_missing_live_page_fails(self):
del data["/apps"]
self.assertFalse(inspect(data)["passed"])

def test_homepage_click_mislabeled_view_fails(self):
data = valid_pages()
data["/"] = data["/"].replace("app_detail_click", "app_view")
self.assertFalse(inspect(data)["passed"])

def test_homepage_missing_card_click_event_fails(self):
data = valid_pages()
data["/"] = data["/"].replace("app_detail_click", "something_else")
self.assertFalse(inspect(data)["passed"])

def test_stale_homepage_metadata_fails(self):
data = valid_pages()
data["/"] += "92 Apps on Google Play"
Expand Down
Loading