Skip to content

Commit

Permalink
Fix value check when populating properties (close #29)
Browse files Browse the repository at this point in the history
  • Loading branch information
adatzer committed Apr 7, 2023
1 parent c99f065 commit 7bbc4e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ const getEventDataByKeys = (configProps) => {
const props = {};
configProps.forEach((p) => {
let eventProperty = getEventData(p.key);
if (eventProperty) {
if (eventProperty !== undefined) {
props[p.mappedKey || p.key] = eventProperty;
}
});
Expand Down Expand Up @@ -2678,6 +2678,10 @@ scenarios:
key: 'x-sp-self_describing_event_com_snowplowanalytics_snowplow_media_player_event_1.type',
mappedKey: 'media_event_type',
},
{
key: 'x-sp-contexts_com_youtube_youtube_1.0.autoPlay',
mappedKey: 'autoPlay',
},
{
key: 'x-sp-tp2.tv',
mappedKey: 'tracker',
Expand Down Expand Up @@ -2723,6 +2727,7 @@ scenarios:
event_properties: {
media_event_type: 'play',
tracker: mockClientEvent['x-sp-tp2'].tv,
autoPlay: false,
},
user_properties: {
email: mockClientEvent.user_data.email_address,
Expand Down

0 comments on commit 7bbc4e6

Please sign in to comment.