CMS Development

SteveHTM
Guide | Partner
Guide | Partner

Looking for a way to find Country IP in HubL

SOLVE

Let me know if I'm missing something here.

Documented HubL variables include 'request.remote_ip' and default Contact properties include 'IP Country' etc.

 

The smart content rules in Rich Text page modules include switches to change content based on visitor Country, but I'd like a little finer grain control that that offers using HubL logic. How can I get hold of IP Country for the landing page context to help make appropriate contet selections. Is it just an undocunmented HubL variable?

 

Any help appreciated!

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
0 Upvotes
1 Accepted solution
Stephanie-OG
Solution
Key Advisor

Looking for a way to find Country IP in HubL

SOLVE

Hey @SteveHTM 

 

Sometimes when I'm trying to figure out HubL variables that might not be documented I take a look at the Developer Info on a page. 

 

I found {{ request.geoip_country }} which returns a country string like "ca", "us" that might help?

 

Note the warning: 

 

Much of the data found in developer info is used internally, and is subject to change if not otherwise documented.

View solution in original post

0 Upvotes
2 Replies 2
SteveHTM
Guide | Partner
Guide | Partner

Looking for a way to find Country IP in HubL

SOLVE

Thank you @Stephanie-OG! Thats what I should have though of when pondering the question! Sometimes a little {{pprint}} in HubL helps as well.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
Stephanie-OG
Solution
Key Advisor

Looking for a way to find Country IP in HubL

SOLVE

Hey @SteveHTM 

 

Sometimes when I'm trying to figure out HubL variables that might not be documented I take a look at the Developer Info on a page. 

 

I found {{ request.geoip_country }} which returns a country string like "ca", "us" that might help?

 

Note the warning: 

 

Much of the data found in developer info is used internally, and is subject to change if not otherwise documented.

0 Upvotes