Skip to content

Commit d87a6ed

Browse files
authored
Google analytics - Use v4 API as standard (#502)
* Update lightbox and video embed docs with current video * Updated the GA module to default to GA v4 API * Updated docs for GA tracking page * Add video controls * Remove video tracking from video player, as now happens by default in GA4 * Compiled JavaScript * Set debug mode for excluded environments * Compiled JavaScript * Updated package lock after npm install * Version bump, to 14.2.0 * Update default account ID, removing test ID * Add notice to console when old GA tag is being used. * Export the `isExcludedEnvironment` function * Export functions from the GA module * Added a `logDeprecatedFunctionToConsole` function to log deprecated functions * Reinstate deprecated functions and log to console * Compiled JavaScript * Add spread'ed arguments to deprecated functions so consumers don't throw errors. * Ensure video lightbox element is the link, rather than any child elements. * Compiled JavaScript * Replicate Google Analytics `form_submit` event on successful Marketo form submissions. * Compiled JavaScript
1 parent 9f3c1c7 commit d87a6ed

14 files changed

+8252
-1782
lines changed

dist/honeycomb.app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/honeycomb.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/honeycomb.js

Lines changed: 6154 additions & 413 deletions
Large diffs are not rendered by default.

dist/honeycomb.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js-library/ga-tracking.htm

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,24 @@
1212
<div class="band__inner-container">
1313
<h1 class="section-heading--style-guide">Google Analytics tracking</h1>
1414
<p>Use data attributes on elements to track their click with google analytics event tracking.</p>
15-
<p>This will capture the data in both the current and universal analytics platforms.</p>
16-
17-
<h2 class="section-heading--style-guide">HTML</h2>
18-
<p data-height="350" data-theme-id="0" data-slug-hash="yyzPwj" data-default-tab="html" data-user="redgatewebteam" class='codepen'>See the Pen <a href='http://codepen.io/edwardcasbon/pen/OPmKoG/'>Redgate - Google analytics tracking</a> by Edward Casbon (<a href='http://codepen.io/edwardcasbon'>@edwardcasbon</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
1915

16+
<code><pre>
17+
<span><</span>p
18+
data-ga-track
19+
data-ga-track-event="event-name"
20+
data-ga-track-first-name="First"
21+
data-ga-track-surname="Surname"
22+
data-something-else="xyz"
23+
<span>></span>Click me<span><</span>/p<span>></span></pre></code>
24+
25+
<p
26+
class="display--inline padded--tight background-color--grey color--white"
27+
data-ga-track
28+
data-ga-track-event="event-name"
29+
data-ga-track-first-name="First"
30+
data-ga-track-surname="Surname"
31+
data-something-else="xyz"
32+
>Click me</p>
2033

2134
<h2 class="section-heading--style-guide">Options</h2>
2235
<table>
@@ -27,16 +40,10 @@ <h2 class="section-heading--style-guide">Options</h2>
2740
</thead>
2841
<tbody>
2942
<tr>
30-
<td>Category</td><td>Category of the tracked event</td><td>null</td><td><code class="code">data-ga-track-category="Category"</code></td>
31-
</tr>
32-
<tr>
33-
<td>Action</td><td>Action of the tracked event</td><td>null</td><td><code class="code">data-ga-track-action="Action"</code></td>
34-
</tr>
35-
<tr>
36-
<td>Label</td><td>Label of the tracked event</td><td>null</td><td><code class="code">data-ga-track-label="Label"</code></td>
43+
<td>Event</td><td>Event name to track the event as</td><td>null</td><td><code class="code">data-ga-track-event="event-name"</code></td>
3744
</tr>
3845
<tr>
39-
<td>Value</td><td>Value of the tracked event</td><td>null</td><td><code class="code">data-ga-track-value="1"</code></td>
46+
<td>{Param}</td><td>Custom param to pass along with the event</td><td>null</td><td><code class="code">data-ga-track-name="Name goes here"</code></td>
4047
</tr>
4148
</tbody>
4249
</table>

docs/js-library/lightbox.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1 class="section-heading--style-guide">Lightbox</h1>
1616
<h2 class="section-heading--style-guide">Example</h2>
1717
<ul>
1818
<li><a href="/assets/images/common/logo.png" class="js-lightbox">Lightbox</a></li>
19-
<li><a href="//www.youtube.com/embed/O8iVLQ_Vnuw" class="js-lightbox--video">Lightbox (with video content)</a></li>
19+
<li><a href="//www.youtube.com/embed/Zz8bdsPn01Q" class="js-lightbox--video">Lightbox (with video content)</a></li>
2020
<li><a href="/" class="js-lightbox--iframe">Lightbox (with iframe content)</a></li>
2121
<li><a href="/assets/images/common/logo.png" class="js-lightbox--image">Lightbox (with image content)</a></li>
2222
<li><a href="#lightbox-inline-example" class="js-lightbox--inline">Lightbox (with inline content)</a></li>

docs/js-library/video-embed.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1 class="section-heading--style-guide">Video embedding</h1>
1616

1717

1818
<h2 class="section-heading--style-guide">Example inline embed</h2>
19-
<div class="js-video-container video-container" data-video-id="O8iVLQ_Vnuw"></div>
19+
<div class="js-video-container video-container" data-video-id="Zz8bdsPn01Q" data-video-controls="1"></div>
2020

2121
<h2 class="section-heading--style-guide">Example background video</h2>
2222
<p>{Killed the autoplay example}</p>

0 commit comments

Comments
 (0)