Rich-text Reply

Pushed event callback

Gus 08-27-14
Accepted Solution

Pushed event callback

Hi all,

 

i need to launch a callback after a pushed trackEvent is succesful. Is there any way to know that using  the Optimizely API?

Thanks in advance,

 

Gus

Gus Ces
/Web (developer|analyst|CRO specialist)/g

Gus
Level 2

michaelwei 08-27-14
 

Re: Pushed event callback

Hi Gus,

 

We don't keep track of the response, but the push is generally very reliable. You could potentially check the pendingLogEvents cookie to make sure it's sent off appropriately, but unfortunately there's no way to get the actual success response.

 

What are you looking to do in the callback?

Optimizely
Gus 08-28-14
 

Re: Pushed event callback

Hi Michael,

i´m having some issues regarding cancelled goal requests in Chrome. I have some links with inline onclick location.href and with a click goal on them. But apparently, chrome cancels the requests when executes the location.href. So i need to execute the redirection after the goal push is succesful.

But thinking that pendingLogEvents is just the answer. I only have a question, the events logged in that cookie are sent in any page with the Optimizely snippet or the next page of the redirection has to be url targeted too?



Gus Ces
/Web (developer|analyst|CRO specialist)/g

Gus
Level 2
michaelwei 08-28-14
 

Re: Pushed event callback

[ Edited ]

Is the href going to a different domain or the same domain? If it's on the same domain (and the snippet is installed on the target page), then Optimizely automatically makes sure that pending events are fired.


If it's a different domain, you'll have to manually send off an event, since the cookie does not persist cross-domain. Here's a KnowledgeBase article that talks about using offline events:
https://help.optimizely.com/hc/en-us/articles/200040195

 

But to answer your question directly, you do need the snippet but it doesn't have to be a target of the experiment.

Optimizely