Re: Extracting data from Activity Record Information - Is this possible?

AshleighMo
Level 5

Extracting data from Activity Record Information - Is this possible?

Hi there again, 

 

I believe this is likely possible with the help of an experienced Developer that can write some code but figured I would check in with other experts here.. Is it possible to extract data from a Querystring in the activity record for a lead? Specifically I want to pull out the UTM_Medium, etc. Is there an easy way to pull that out? 

 

I know that for some scenarios I can use {{Trigger.}} function to get certain information, but i believe I can only get the full string and not a subsection of it. 

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: Extracting data from Activity Record Information - Is this possible?


Is it possible to extract data from a Querystring in the activity record for a lead? Specifically I want to pull out the UTM_Medium, etc. Is there an easy way to pull that out? 

Well, you haven’t specified which activity type (Visit Web Page, Click Link, Filled Out Form, etc.) but: Yes, any activity type that stores query strings can be retrieved via the REST API and the query string can be broken down into its param names and param values.

 


I know that for some scenarios I can use {{Trigger.}} function to get certain information, but i believe I can only get the full string and not a subsection of it. 

There are actually very few places where you can use a {{trigger.token}} to see the query string. For the Visit Web Page activity, for example, {{trigger.web page}} includes the hostname, pathname, and hash, but not the query string.

 

Perhaps if you could explain what you plan to do with the query params + query values it would help narrow the recommendation.

AshleighMo
Level 5

Re: Extracting data from Activity Record Information - Is this possible?

Thanks Sanford, Busy week here! Appreciate the reminder to check back. 

So the goal is to be able to pull out certain utm parameters to stamp into the lead record custom fields. This is easily covered via a form for gated assets but the team is also looking to have the same level of tracking for ungated assets too. I was able to implement some work around campaigns for source and medium but since there are so many unique values for campaigns, I can't use a workaround unless I can pull out that unique value. 

 

Basically, the team is trying to be able to pull reports with that data since there are so few people that have access to our analytics platform. So there is a bit of a silo at seeing and reporting on the data. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Extracting data from Activity Record Information - Is this possible?

There’s no way around it: you need to use the REST API, either called via a webhook-compatible service or via a separate app. There’s no other way to access the query string for ungated assets.

 

(OK, you could  send a special Munchkin hit for ungated assets that moves the query string info into the path. Then you can pass {{trigger.Web Page}} it to a webhook for parsing, and you wouldn’t need the REST API so it would be a lot more efficient.)

SanfordWhiteman
Level 10 - Community Moderator

Re: Extracting data from Activity Record Information - Is this possible?

@AshleighMo please return to your thread and check responses.