Calculate Age Adobe Analytics | Community
Skip to main content
Luca_Lattarini
Level 9
June 26, 2020
Solved

Calculate Age Adobe Analytics

  • June 26, 2020
  • 2 replies
  • 1461 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by raj_mandalapu

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

 

 

2 replies

David_Jerome
Level 6
June 26, 2020

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
raj_mandalapuAccepted solution
Level 7
June 26, 2020

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