Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Average time between 2 suces events

Avatar

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile
marion33678522
Level 7

16-02-2018

Hello Adobe Community,

I've been asked to mesure the average time between 2 different events on unique visitors ( so first event can happen in visit number x, and second event on another separeted visit ).

How can this be done ? There was a document on a Time To Complete Plug-in , but without any explanation.

Kind regards,


Cheers,

Mario

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

22-02-2018

marion33678522​ btw: if you are using the adobe moblie sdk‘s, there is a function specially for this:

iOS: Timed Actions

Android: Timed Actions

you could just hand over the desired events and links above to the devs, should be straight forward ...

Answers (7)

Answers (7)

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

19-02-2018

hi mario

the solution written by PratheepArunRaj​ is really short, would try to go with that.

btw: i don‘t think this will work with a mobile sdk. but you can ask the developpers to do same:

1) save timestamp on first action

2) save timestamp on second action

3) calculate difference 2)-1) and send data to analytics

4) save data to prop/evar in analytics backend

Avatar

Avatar
Seeker
Moderator
PratheepArunRaj
Moderator

Likes

308 likes

Total Posts

863 posts

Correct Reply

263 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Affirm 250
Contributor
View profile

Avatar
Seeker
Moderator
PratheepArunRaj
Moderator

Likes

308 likes

Total Posts

863 posts

Correct Reply

263 solutions
Top badges earned
Seeker
Bedrock
Engage 1
Affirm 250
Contributor
View profile
PratheepArunRaj
Moderator

16-02-2018

Dear Mario,

Include the plugin and add the below codes in s_doPlugins section.

>>Code Start<<

if (s.events && (s.events + ",").indexOf("event1,") > -1) {

s.prop1 = "start"

}

if (s.events && (s.events + ",").indexOf("event2,") > -1) {

s.prop1 = "stop"

}

s.prop1 = s.getTimeToComplete(s.prop1, "TTC", 0);

>>Code End<<

Plugin:

>>Code Start<<

s.getTimeToComplete = new Function("v", "cn", "e", "var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v=='start'||v=='stop')s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v=='start'){s.c_w(cn,d.getTime(),e?x:0);return '';}if(v=='stop'){k=s.c_r(cn);if(!s.c_w(cn,'',d)||!k)return '';v=(d.getTime()-k)/1000;var td=86400,th=3600,tm=60,r=5,u,un;if(v>td){u=td;un='days';}else if(v>th){u=th;un='hours';}else if(v>tm){r=2;u=tm;un='minutes';}else{r=.2;u=1;un='seconds';}v=v*r/u;return (Math.round(v)/r)+' '+un;}}return '';");

>>Code End<<

If the implementation requires any other plugin support, include them as well.

Note that the value will be visible only in the 2nd image request i.e. After 2nd event occurs.

Thank You

Arun

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

16-02-2018

there is a documentation about the time parting plugin, i guess that‘s what you need: getTimeParting

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

521 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

22-02-2018

marion33678522

don‘t know, but there could be a way to store the first timedstamp within the app for a longer time (so it is available at the second event)

just to make sure: doing this, you will only get ONE analytics call with a time information. therefore it does not depend on “visits in analytics“ but on the framework collecting the information (eg. app).

Avatar

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile
marion33678522
Level 7

22-02-2018

Hello urs.boller​ ,

I kind of get it, and please correct me if I'm wrong - this won't be feasible for timestamps on 2 diferent visits ?

Kind regards,

Avatar

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile
marion33678522
Level 7

19-02-2018

Hello urs.boller

PratheepArunRaj​ is advising in using s.getTimeToComplete to the s_doPlugin.

Which one is better ?

s.getTomeParting or s.getTimeToComplete ?

Kind regards !

Avatar

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile

Avatar
Validate 50
Level 7
marion33678522
Level 7

Likes

166 likes

Total Posts

170 posts

Correct Reply

5 solutions
Top badges earned
Validate 50
Validate 25
Validate 10
Validate 1
Boost 50
View profile
marion33678522
Level 7

19-02-2018

Thanks alot PratheepArunRaj​ ;


I'll try this,

But do you know if this also works for 2 different sessions on an app (Before I go to my sdk teams and implement a new app build ).

Kind regards,


And cheers,


Mario


Mar