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

SOLVED

Calculate Age Adobe Analytics

1982luca
Level 8
Level 8

Hello everyone,

Currently my client is acquiring from the "Registration Form"  Month and Year  (Born) Seeing that my client wants to calculate Age, anyone knows how to do? 

I am thinking of create a js custom code in the Registration Form which calculates the age during signup but how Analytics updates every year?

Thanks

1 Accepted Solution
raj_mandalapu
Correct answer by
Community Advisor
Community Advisor

I suggest you first check with your client on what he/she is going to do with it and what kind of reports he is going to generate.

The implementation varies based on the reports, you can use classifications something like name:dob:location and create classification builder to build buckets ( 20 - 30 ), ( 30 - 40 ), etc. but this also be problem when it comes to next year.

(or) you can use separate eVar for this, what you need to do is here, you need to calculate age at front end and pass it to the registration event but the problem here is it will not updated every year. the important thing which you need to check is what he/she wants, current DOB or age at the time of registration? 

 

I never tried for dates but, you can also try creating segments for age groups

 

 

View solution in original post

2 Replies
David-123
Level 7
Level 7

Hi there,

 

Firstly you need to be careful if you capturing this information because of GDPR. It's worth checking your legal team is happy but providing they are, I would actually go with the simple solution of using javascript datediff and a getdate(), so no updating is required.

 

https://www.w3resource.com/javascript-exercises/javascript-date-exercise-8.php

 

Thanks

 

Dave

raj_mandalapu
Correct answer by
Community Advisor
Community Advisor

I suggest you first check with your client on what he/she is going to do with it and what kind of reports he is going to generate.

The implementation varies based on the reports, you can use classifications something like name:dob:location and create classification builder to build buckets ( 20 - 30 ), ( 30 - 40 ), etc. but this also be problem when it comes to next year.

(or) you can use separate eVar for this, what you need to do is here, you need to calculate age at front end and pass it to the registration event but the problem here is it will not updated every year. the important thing which you need to check is what he/she wants, current DOB or age at the time of registration? 

 

I never tried for dates but, you can also try creating segments for age groups

 

 

View solution in original post