I am trying to integrate the recommendations in my mobile app for both Android and iOS. So far things that I have done are :-
1. created a recommendation in target, whose main purpose would be to give results based on the country.
This is what my criteria looks like :
and this is how I choose the key
And then in design, I am returning the json which looks something like this
Also I have uploaded a .csv file, which is used to feed the data.
And I am calling my recommendation as:
customParameters.put("enitity.id","mexico"); //hashmap has been created
TargetLocationRequest loadActivity = Target.createRequest("mobile_featured_destinations",null,customParameters);
Target.loadRequest(loadActivity, new Target.TargetCallback<String>() {
@Override
public void call(String callback) {
System.out.println("callback received from target: "+mboxName+ "is: "+callback);
}
Now the results that I am getting are same irrespective of whatever value I pass, as I am expecting that on passing "india", the recommendation order will change as mentioned in the feed, but it's not happening. Is there anything I am missing, or understanding and implementing it incorrectly.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @bhavna18
How is the user.country being set? Is that a profile script that returns the visitor's county based on some geo lookup? If so, you don't need to pass an entity.id in the request to Target. The profile script will run and provide the "key" for the recommendations. You wouldn't be able to "spoof" other keys though unless you can get the profile script to return a different value.
However, if you are wanting to pass the country directly to Target as the key/id you can do that too. To make that work I'd keep the criteria key as current item and then pass the entity.id of the country in the request.
Hope that helps.
Views
Replies
Total Likes
Hi @bhavna18
How is the user.country being set? Is that a profile script that returns the visitor's county based on some geo lookup? If so, you don't need to pass an entity.id in the request to Target. The profile script will run and provide the "key" for the recommendations. You wouldn't be able to "spoof" other keys though unless you can get the profile script to return a different value.
However, if you are wanting to pass the country directly to Target as the key/id you can do that too. To make that work I'd keep the criteria key as current item and then pass the entity.id of the country in the request.
Hope that helps.
Views
Replies
Total Likes
Hi @Ryan_Roberts_,
Thanks for making this clear. I have a question , how user.country picks the country?
Also, when I am trying by passing custom parameter, entity.id as mentioned in the above comment, and setting my criteria key/ recommendation key to current item keeping other things same,I am getting any results. Is this the expected behavior, since I haven't made any changes in the criteria, so I need to do some other changes to validate it?
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @Ryan_Roberts_,
user.country which is custom parameter to my account has been set as "profile.geolocation.country". But on what bases this profile changes the location? I mean is there any way I can get different results by changing the this value, if so how can I do it since I am not passing anything into profile.
Views
Replies
Total Likes
Also, the error you pointed i fixed but still not getting any results. This is my new criteria
The csv is same as I uploaded in my initial comment and my recommendation looks like this:-
But still I was not getting any results,
customParameters.put("enitity.id","mexico"); //hashmap has been created
TargetLocationRequest loadActivity = Target.createRequest("mobile_featured_destinations",null,customParameters);
Target.loadRequest(loadActivity, new Target.TargetCallback<String>() {
@Override
public void call(String callback) { //this returns null
System.out.println("callback received from target: "+mboxName+ "is: "+callback);
}
Views
Replies
Total Likes
Hi, the profile.geolocation.country is using the out of the box geolocation feature from Target. In a nutshell it's IP based lookup that happens at the beginning of each session. You can read details here: https://docs.adobe.com/content/help/en/target/using/audiences/create-audiences/categories-audiences/...
Please DM me about the other question with your account details. I can help look into that for you.
Views
Replies
Total Likes
Thanks for the help!
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies
Views
Like
Replies