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
16 changes: 16 additions & 0 deletions scripts/test_gsc_support_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@ def test_face_support_does_not_promise_download(self):
self.assertEqual(self.face.count('data-alternative="'), 2)
self.assertNotIn("com.appdevelopsk.face_reaction_battle", self.face)

def test_face_alternative_outbound_uses_standard_app_slug(self):
self.assertIn(
"app_slug: a.getAttribute('data-alternative') || 'face-reaction-battle'",
self.face,
)
self.assertIn("source_app: 'face-reaction-battle'", self.face)
self.assertIn(
"placement: a.hasAttribute('data-alternative') ? 'alternative' : 'details'",
self.face,
)
# Keep the historical parameter temporarily for downstream consumers.
self.assertIn(
"app: a.getAttribute('data-alternative') || 'face-reaction-battle'",
self.face,
)

def test_canonicals_unchanged(self):
for slug, html in (("dog-breeds-encyclopedia", self.paw),
("face-reaction-battle", self.face)):
Expand Down
2 changes: 1 addition & 1 deletion support/face-reaction-battle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
if (!a) return;
var href = a.getAttribute('href') || '';
if (/play\.google\.com/.test(href)) {
gtag('event', 'download_click', { store: 'google_play', location: 'support', app: a.getAttribute('data-alternative') || 'face-reaction-battle', placement: a.hasAttribute('data-alternative') ? 'alternative' : 'details', link_url: href });
gtag('event', 'download_click', { store: 'google_play', location: 'support', app: a.getAttribute('data-alternative') || 'face-reaction-battle', app_slug: a.getAttribute('data-alternative') || 'face-reaction-battle', source_app: 'face-reaction-battle', placement: a.hasAttribute('data-alternative') ? 'alternative' : 'details', link_url: href });
}
}, true);
</script>
Expand Down
Loading