This principle is relatively simple, similar to the second method of writing data into a cookie. The action is to call the third party API to use IP to query the geographic location and other information. Then the API will return the data,There are multiple ways to pass data to Adobe Launch. You can go to the data layer, it can be a custom event in Rule, you can also write it to cookies, js variables, etc.
I don’t recommend using custom events, this will increase the usage of Call.
The function of this code is to get geographic information through API query, and then write the IP and geographic location into the cookie:
Then I published a test and saw that our IP and city were written into the cookie:
The next step is to read the cookie into the data element, and then send it to Adobe Analytics using eVars. Go and try it! !!