Closed eric-schneider closed 2 months ago
UI bundle preview build successful! :white_check_mark: Deploying preview to GitHub Pages. Deployment successful! View preview
Antora site build successful! :white_check_mark: Deploying draft to GitHub Pages. Deployment successful! View draft
@eric-schneider To answer your question, yep adding this to the partials will include it on every page as long as the site.keys.scarf_tracking_pixel
exists
UI bundle preview build successful! :white_check_mark: Deploying preview to GitHub Pages. Deployment successful! View preview
Antora site build successful! :white_check_mark: Deploying draft to GitHub Pages. Deployment successful! View draft
JIRA: DOC-4013 Resolves: https://github.com/riptano/docs-ui/issues/117
This PR adds a new partial,
tracking-pixel.hbs
, that implements a conditional tracking pixel with a variable ID. The tracking pixel code will only get built into pages when thesite.keys.scarf_tracking_pixel
key is defined in the playbook and assigned a value:See related playbook change.
From what I understand, tracking pixels are usually placed right before the closing
</body>
tag so that they don’t delay the loading of any visible content. For this reason, I've inserted thetracking-pixel
partial at the bottom ofbody.hbs
.@colegoldsmith, this ensures that the pixel will get included on every page, correct?
I've also seen it suggested that it's a good idea to hide the pixel with a CSS style so that the pixel doesn’t interact with other CSS on the page. For this reason, I've added
style="display:none
to the pixel.