Skip to content

Commit

Permalink
add event name not present check for track call
Browse files Browse the repository at this point in the history
  • Loading branch information
akashrpo committed Jul 19, 2021
1 parent 83d22de commit f8b97b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions integrations/RedditPixel/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ class RedditPixel {
logger.debug("In RedditPixel track");

const { event } = rudderElement.message;

if (!event) {
logger.error("Event name is not present");
return;
}

switch (event.toLowerCase()) {
case "product added":
window.rdt("track", "AddToCart");
Expand Down

0 comments on commit f8b97b8

Please sign in to comment.