Expand my Community achievements bar.

SOLVED

Event for Pincode Check and success

Avatar

Level 4

Hi,

Actually I need to create an event for checking how many Pincode check have been done on website, and how many Pincode success done on the same. In my Usecase, before adding the product in cart, there is Pincode check, to find whether product is delivered or not?

 

Capture2.PNG

something likethis, so can anyone help me how to achieve the same through launch or any reference link for creating like this events.

1 Accepted Solution

Avatar

Correct answer by
Level 8

@bindukumari1990 

It's hard to give specifics without knowing how the page is built, but at a high level, I would assume there's a form submit event when the customer submits a pincode. When that happens, you could trigger an s.tl() (link tracking) call with the necessary information. (I'd capture the pincode and a success event, at a minimum.) 

When the results come back from the server, I would send another s.tl() call (pincode, success event, and result). This, of course, assumes the customer remains on the same page, and that the information is returned dynamically. How you monitor for the information may vary based on how your page is set up... Are you using an event-driven data layer? Does the information get written to a JS variable or cookie? Can you monitor for changes to the DOM (mutationObserver)?

View solution in original post

5 Replies

Avatar

Correct answer by
Level 8

@bindukumari1990 

It's hard to give specifics without knowing how the page is built, but at a high level, I would assume there's a form submit event when the customer submits a pincode. When that happens, you could trigger an s.tl() (link tracking) call with the necessary information. (I'd capture the pincode and a success event, at a minimum.) 

When the results come back from the server, I would send another s.tl() call (pincode, success event, and result). This, of course, assumes the customer remains on the same page, and that the information is returned dynamically. How you monitor for the information may vary based on how your page is set up... Are you using an event-driven data layer? Does the information get written to a JS variable or cookie? Can you monitor for changes to the DOM (mutationObserver)?

Avatar

Level 4

@Brian_Johnson_ 

can you elaborate your reply, yes it is form. But I need to capture how many people entered Pincode and how many pincode success we got it, Right now creating two rules where  setting up the events i.e pincode check and pincode success in set variable action.

 

But, I am not S.tl() call. So, does it sound right?

Avatar

Level 8
Again, it's hard to give specific answers without knowing how the page is set up, but as long as you're triggering a call at those specific times, you should be good. I suggested s.tl() calls simply because the tracking is likely to occur without the user being sent to a new/different page, or reloading the current page. If they are being sent to a different page (or reloading the current page), you could include the success events and related information (ie// pincode searched, and the result) in the existing page load calls.

Avatar

Level 10
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?