Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Using Audience Targeting CE
I need to customize the home page based on some criterias. I`ve installed Audience Targeting to do this task but i can´t do it works.
It works for non logged users? Most of the users of the web may not be logged but i need to show them diferents promos based on their previous navigation. For example: If the user have visited the page /ships, i have to change the home promos for that user.
To do this i've created an user segment rule of visit page (/ships) and then i've put the user segment web content on the home and i've configured it.
If belongs to (rule created before) then show determinated web Content, otherwise, show nothing but i always see the same content independently if I check the /ships page or not.
The same behaviour occurs with the rule Content Visited.
The only rule that i've able to check are the sessions attributes.
Am i doing something wrong about behaviour and user attributtes rules?
Thanks a lot.
Iñigo
Yes, it should work for non-logged users, given certain conditions. Could you please first tell which version of Audience Targeting and Liferay Portal you are using?
Thanks
Where can i check the Aucience Targeting version? i can´t see it anywhere.
About Liferay, we are using "liferay-portal-6.2-ee-sp17".
The only rule that i make work is about user Segments (gender, age) or environment segments (server hour, browser..) but the funcionality really interesing for me as page visited or content viewed don´t work for me either with non-logged users.
Thanks a lot.
Íñigo
It's the version number you downloaded from Marketplace (e.g. the latest for Liferay Portal 6.2 is 1.1.5).
Behavior rules depends on the tracking of the user activity by Audience Targeting integrated analytics system. By default, when you visit a page or a web content, this is tracked in the browser by the analytics JS client and ultimately stored in the analytics tables. I would suggest some tests to check if the analytics are working in your case:
1. Open the page you want to track (e.g. /ship) in your browser with the developer tools enabled. Check that every time you load the page, a track event is sent by the analytics client. If you observed any JS errors here, that would explain why the analytics based rules are not working.
2. If 1 works, check out the ct_analytics_event table in your Liferay database. Are there any data in it?
3. If you go to your user segment -> actions -> Reports and update the report as described here, do you see any result? (Reports also consume the analytics service).
These checks would tell if the error is on the event tracking or in the rules themselves.
Thanks
I've verified the tests you indicates me and:
1.- I don´t have any Javascript error.
2.- In my DDBB don´t exist any table called "ct_analytics_event" but there is a table called "CT_ANALYTICS_ANALYTICSEVENT" that is with data and it's updated correctly.
3.- The reports sections is working correclty but only if I'm logged in increments the visit number of the page. When I'm logged out, the reports of the page is not incremented.
It seems that is only with non-logged users when AucienceTargeting is working wrong.
We have google analitics in the web, it's possible that may be the problem?
Thanks,
Íñigo
Did you observe if in the anonymous navigation case, when you load the page a POST request is sent to analytics-processor/track? Is the response 200? Does it contain an anonymousUserId?
In the CT_ANALYTICS_ANALYTICSEVENT table, do you get new entries when a non-authenticated user browsers the site?
Sorry for these checks. If you get neither JS errors in the browsers nor server errors in the Liferay log, checking every piece function is the only way to determine where the issue might be, without debugging the code.
Thanks
I have returned to this task and I have carried out the tests that you requested in the last post. I've write all of them in a word but in resume.
User not logged in.
- CT_ANALYTICS_ANALYTICSEVENT table is creating entries.
- Reports are empty and are not updated
- Post returns 200 and userID=10134
User logged in.
- CT_ANALYTICS_ANALYTICSEVENT table is creating entries.
- The reports are not empty and are updated with each visit
- Post returns 200 and userID=10168
About the anonymousUserId in the POST, i've non seen any, where it should be?¿
Attachments:
Thanks for the detailed response. It's been very useful. What we can tell from it is:
- The tracking system is working correctly on both authenticated and non-authenticated scenarios
- The report associated to the user segment is not reflecting the activity of non-authenticated users, meaning that they have not been considered "members" of that user segment. This is consistent with the primary issue (targeted content are not displayed to those users).
I can confirm that the issue lies on the temporary id that non-authenticated users are give (aka anonymousUserId). If you look at this field in the CT_ANALYTICS_ANALYTICSEVENT table in the non-authenticated scenario (first table), this value is different when the user visits the cruceros/mediterraneo page than when the user visits the audience page. In contrast, this value is the same across the "journey" in the case of the authenticated scenario (second table).
In other words, when the non-authenticated user visits the audience page, the system does not recognizes him as the same one that visited the cruceros/mediterraneo page. For non-authenticated sessions, the anonymousUserId is stored in a cookie named "ANONYMOUS_USER_ID". Are you cleaning cookies during the test? Could you check the value of this cookie through the test steps?
Thanks!
As you mentioned, the anonymousUserId is the same in the navigation of registered users, but it changes in each visited page for an unregistered user.
I checked the value of the "ANONYMOUS_USER_ID" cookie and it does not appear for both logged and unlogged users, maybe we found the issue?
Kind regards,
Iñigo
Yes, if the cookie is not present, the non-authenticated user won't be properly identified in further requests, and that'd cause the issue. Are you blocking cookies with some plugin? If that's the case, the non-authenticated scenario will not work.
Thanks
I don´t have any plugin to block cookies. In fact, the other cookies are setted and working properly.
We use google analytics in the web, its possible to have conflict with this two components?
Kind regards,
Íñigo
Hi Eduardo,
Finally, i installed a clean liferay CE bundle to verify my AudienceTargeting was working. In this bundle, the component works properly for both, guest and logged users, so, the problem has to be in my own portal.
I've checked the portal properties in both bundles and i found a difference on this property:
session.enable.persistent.cookies
In the clean bundle is setted to true and in my portal it´s setted to false, setting this property to true, at last i have the ANONYMOUS_USER_ID cookie for guest users and audience targeting is segmenting right.
My question now is : There is anything that i have to considerer or to check for the reason of having changed this property?In other words, what is the purpose of that property?
Thanks for all Eduardo,
Kind regards
Hi Iñigo,
Sorry for the (very) late reply. When the property is set to true (default) certain cookies persist accross sessions in your browser. That's the case of the "remember me" option in the sign in portlet, for instance. In the case of Audience Targeting, the cookie is needed to preserve the anonymous user id accross sessions and to eventually associate it to an authenticated user.
Regards
Powered by Liferay™