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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to track a custom variable

jono70
Level 2
Level 2

How do we track a custom variable?

In summary, we have a form on our website and when someone completes the form they receive a unique quote number. It is this unique quote number that we use to create a custom variable. If the customer returns to the site they input this unique quote number to show their details. The customer may return on more than one occasion (sometimes on the same day, sometimes on multiple days) and input their quote number.

We need to identify the first time/date the customer received this quote number, if this is possible?

tx

Jon

1 Accepted Solution
jantzen_belliston-Adobe
Correct answer by
Level 10
Level 10

HI Jon,

Are you using DTM on your site? If so, you can create a data element that uses a CCS selector or JSON to retrieve the value from the page. You would want to also create an event-based rule that is triggered when the forum is submitted. That way the data element would be called when the forum is submitted and the value would then be stored in the data element for use in whatever call/code you'd like. 

As for the date, there are a few options. I believe in Analytics you can set up your variable to keep track of the first value it received for each user. Another option would be to use some Javascript or a plugin to generate a time/date stamp at the time of the forum submission (this could be placed in the custom code section of the event-based rule). Once you've got the timestamp, you would have to decide if you wanted to include that in the same variable with the quote number or use a different variable for this.

let me know if I can provide additional details or clarification.

 

Thanks,
Jantzen

View solution in original post

2 Replies
jantzen_belliston-Adobe
Correct answer by
Level 10
Level 10

HI Jon,

Are you using DTM on your site? If so, you can create a data element that uses a CCS selector or JSON to retrieve the value from the page. You would want to also create an event-based rule that is triggered when the forum is submitted. That way the data element would be called when the forum is submitted and the value would then be stored in the data element for use in whatever call/code you'd like. 

As for the date, there are a few options. I believe in Analytics you can set up your variable to keep track of the first value it received for each user. Another option would be to use some Javascript or a plugin to generate a time/date stamp at the time of the forum submission (this could be placed in the custom code section of the event-based rule). Once you've got the timestamp, you would have to decide if you wanted to include that in the same variable with the quote number or use a different variable for this.

let me know if I can provide additional details or clarification.

 

Thanks,
Jantzen

View solution in original post

jono70
Level 2
Level 2

Many thanks Jantzen,

We've now resolved this by using a combination of Dimension, Segment and Metric to obtain this data.

Thanks again,

Jon