Skip to content

Commit

Permalink
Add OTB Button Click Tracking (close #1267)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-el committed Nov 24, 2023
1 parent 5cb4d38 commit dc64c4f
Show file tree
Hide file tree
Showing 25 changed files with 940 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@snowplow/browser-plugin-button-click-tracking",
"comment": "Add Button Click tracking plugin (close #1267)",
"type": "none"
}
],
"packageName": "@snowplow/browser-plugin-button-click-tracking"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@snowplow/tracker-core",
"comment": "Export 'removeEmptyProperties'",
"type": "none"
}
],
"packageName": "@snowplow/tracker-core"
}
12 changes: 8 additions & 4 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
"name": "@snowplow/browser-plugin-browser-features",
"allowedCategories": [ "trackers" ]
},
{
"name": "@snowplow/browser-plugin-button-click-tracking",
"allowedCategories": [ "trackers" ]
},
{
"name": "@snowplow/browser-plugin-client-hints",
"allowedCategories": [ "trackers" ]
Expand All @@ -58,6 +62,10 @@
"name": "@snowplow/browser-plugin-error-tracking",
"allowedCategories": [ "trackers" ]
},
{
"name": "@snowplow/browser-plugin-focalmeter",
"allowedCategories": [ "trackers" ]
},
{
"name": "@snowplow/browser-plugin-form-tracking",
"allowedCategories": [ "trackers" ]
Expand Down Expand Up @@ -118,10 +126,6 @@
"name": "@snowplow/browser-plugin-youtube-tracking",
"allowedCategories": [ "trackers" ]
},
{
"name": "@snowplow/browser-plugin-focalmeter",
"allowedCategories": [ "trackers" ]
},
{
"name": "@snowplow/browser-tracker",
"allowedCategories": [ "plugins", "trackers" ]
Expand Down
119 changes: 81 additions & 38 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/repo-state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "57af2bb401d45bb58b802eb1a04a7ee62b3aa732",
"pnpmShrinkwrapHash": "f22225c05d2747a95a11b5d6c6ee8827084cf800",
"preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f"
}
2 changes: 1 addition & 1 deletion libraries/tracker-core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ export function buildConsentGranted(event: ConsentGrantedEvent) {
* @param exemptFields - Set of fields which should not be removed even if empty
* @returns A cleaned copy of eventJson
*/
function removeEmptyProperties(
export function removeEmptyProperties(
event: Record<string, unknown>,
exemptFields: Record<string, boolean> = {}
): Record<string, unknown> {
Expand Down
29 changes: 29 additions & 0 deletions plugins/browser-plugin-button-click-tracking/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2023 Snowplow Analytics Ltd, 2010 Anthon Pang
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit dc64c4f

Please sign in to comment.