[ 
https://issues.apache.org/jira/browse/UNOMI-1024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated UNOMI-1024:
-------------------------------
    Description: 
h3. Summary

Websites set up by following an older version of the Unomi tracker tutorial 
lose their page views and clicks when they use Unomi 2.4 or later: Unomi 
discards them without any visible error, so reports and segments based on 
browsing behaviour stay empty. The example in the manual contained a setting 
that newer Unomi versions no longer accept, and the tracker still sends it. The 
fix makes these websites work again without any change on their side.

Technical detail: the tracker sends the whole digitalData.page object as the 
properties of the page item (buildSourcePage, buildTargetPage). UNOMI-790 
removed "attributes" from the page schema in 2.4.0 (UNOMI-800 was the same 
symptom on the sample page), so from 2.4 an event whose page has "attributes", 
even empty, fails validation and is dropped. Unomi 2.0 to 2.3 accepted an empty 
"attributes" (or null), but no content in it: an "attributes" with content is 
rejected by every default page schema, so only deployments that extended the 
schema store it. Checked with Unomi 2.3.0, 2.7.0, 3.0.0 and 4.0. The tracker 
tutorial and README no longer show "attributes" (UNOMI-1019), but the event 
examples in builtin-event-types.adoc still do.

The goal of this ticket is that sites with the old setup get their events 
stored again, without changing anything on their side and without changing 
anything for other sites.

h3. Decided approach
* Leave "attributes" out of the page properties sent when it is empty. It 
carried no data, so nothing is lost with Unomi 2.0 to 2.3, and the events are 
stored again with 2.4 and later.
* Send a non-empty "attributes" exactly as before (the same object), for 
deployments that extended the page schema to accept it.
* Never change digitalData.page itself: the page properties sent are a copy 
without "attributes", so site code that reads digitalData.page sees no 
difference.
* Pages without "attributes" are sent exactly as before.
* Remove "attributes" from the event examples in builtin-event-types.adoc 
(apache/unomi).

Note for the release notes: a rule on a Unomi 2.0 to 2.3 server that tests for 
an empty page "attributes" would stop matching.

h3. How to test
* Unit tests: with "attributes": {} the page properties sent have no attributes 
and digitalData.page keeps them; with non-empty attributes, and without 
attributes, the page object is sent as is.
* yarn test:servers: a page with empty "attributes" gets its events stored on 
every server (Unomi 2.3.0, 2.7.0, 3.0.0, 4.0); with non-empty "attributes" the 
server drops the event, as with 1.5.0.
* yarn test:servers compare-1.5.0: the requests are identical to those of the 
published 1.5.0, except for the empty "attributes" no longer sent.

  was:
h3. Summary

Websites whose tracker setup includes a page "attributes" section, as the Unomi 
manual showed until recently, lose their page views and clicks with Unomi 2.4 
and later: Unomi discards them without any visible error, so reports and 
segments based on browsing behaviour stay empty. Unomi stopped accepting this 
section on purpose in 2.4, but the tracker still sends it.

Technical detail: the tracker sends the whole digitalData.page object as the 
properties of the page item (buildSourcePage, buildTargetPage). UNOMI-790 
removed "attributes" from the page schema in 2.4.0 (UNOMI-800 was the same 
symptom on the sample page), so from 2.4 an event whose page has "attributes", 
even empty, fails validation and is dropped. Unomi 2.0 to 2.3 accepted an empty 
"attributes" (or null), but no content in it: an "attributes" with content is 
rejected by every default page schema, so only deployments that extended the 
schema store it. Checked with Unomi 2.3.0, 2.7.0, 3.0.0 and 4.0. The tracker 
tutorial and README no longer show "attributes" (UNOMI-1019), but the event 
examples in builtin-event-types.adoc still do.

The goal of this ticket is that sites with the old setup get their events 
stored again, without changing anything on their side and without changing 
anything for other sites.

h3. Decided approach
* Leave "attributes" out of the page properties sent when it is empty. It 
carried no data, so nothing is lost with Unomi 2.0 to 2.3, and the events are 
stored again with 2.4 and later.
* Send a non-empty "attributes" exactly as before (the same object), for 
deployments that extended the page schema to accept it.
* Never change digitalData.page itself: the page properties sent are a copy 
without "attributes", so site code that reads digitalData.page sees no 
difference.
* Pages without "attributes" are sent exactly as before.
* Remove "attributes" from the event examples in builtin-event-types.adoc 
(apache/unomi).

Note for the release notes: a rule on a Unomi 2.0 to 2.3 server that tests for 
an empty page "attributes" would stop matching.

h3. How to test
* Unit tests: with "attributes": {} the page properties sent have no attributes 
and digitalData.page keeps them; with non-empty attributes, and without 
attributes, the page object is sent as is.
* yarn test:servers: a page with empty "attributes" gets its events stored on 
every server (Unomi 2.3.0, 2.7.0, 3.0.0, 4.0); with non-empty "attributes" the 
server drops the event, as with 1.5.0.
* yarn test:servers compare-1.5.0: the requests are identical to those of the 
published 1.5.0, except for the empty "attributes" no longer sent.


        Summary: Page views and clicks are lost for websites set up with an 
older example from the Unomi manual  (was: Page views and clicks are lost for 
websites whose tracker setup includes page "attributes", as the Unomi manual 
showed)

> Page views and clicks are lost for websites set up with an older example from 
> the Unomi manual
> ----------------------------------------------------------------------------------------------
>
>                 Key: UNOMI-1024
>                 URL: https://issues.apache.org/jira/browse/UNOMI-1024
>             Project: Apache Unomi
>          Issue Type: Bug
>          Components: unomi-tracker
>    Affects Versions: unomi-tracker-1.5.0
>            Reporter: Serge Huber
>            Priority: Major
>             Fix For: unomi-tracker-1.6.0, unomi-tracker-2.0.0
>
>
> h3. Summary
> Websites set up by following an older version of the Unomi tracker tutorial 
> lose their page views and clicks when they use Unomi 2.4 or later: Unomi 
> discards them without any visible error, so reports and segments based on 
> browsing behaviour stay empty. The example in the manual contained a setting 
> that newer Unomi versions no longer accept, and the tracker still sends it. 
> The fix makes these websites work again without any change on their side.
> Technical detail: the tracker sends the whole digitalData.page object as the 
> properties of the page item (buildSourcePage, buildTargetPage). UNOMI-790 
> removed "attributes" from the page schema in 2.4.0 (UNOMI-800 was the same 
> symptom on the sample page), so from 2.4 an event whose page has 
> "attributes", even empty, fails validation and is dropped. Unomi 2.0 to 2.3 
> accepted an empty "attributes" (or null), but no content in it: an 
> "attributes" with content is rejected by every default page schema, so only 
> deployments that extended the schema store it. Checked with Unomi 2.3.0, 
> 2.7.0, 3.0.0 and 4.0. The tracker tutorial and README no longer show 
> "attributes" (UNOMI-1019), but the event examples in builtin-event-types.adoc 
> still do.
> The goal of this ticket is that sites with the old setup get their events 
> stored again, without changing anything on their side and without changing 
> anything for other sites.
> h3. Decided approach
> * Leave "attributes" out of the page properties sent when it is empty. It 
> carried no data, so nothing is lost with Unomi 2.0 to 2.3, and the events are 
> stored again with 2.4 and later.
> * Send a non-empty "attributes" exactly as before (the same object), for 
> deployments that extended the page schema to accept it.
> * Never change digitalData.page itself: the page properties sent are a copy 
> without "attributes", so site code that reads digitalData.page sees no 
> difference.
> * Pages without "attributes" are sent exactly as before.
> * Remove "attributes" from the event examples in builtin-event-types.adoc 
> (apache/unomi).
> Note for the release notes: a rule on a Unomi 2.0 to 2.3 server that tests 
> for an empty page "attributes" would stop matching.
> h3. How to test
> * Unit tests: with "attributes": {} the page properties sent have no 
> attributes and digitalData.page keeps them; with non-empty attributes, and 
> without attributes, the page object is sent as is.
> * yarn test:servers: a page with empty "attributes" gets its events stored on 
> every server (Unomi 2.3.0, 2.7.0, 3.0.0, 4.0); with non-empty "attributes" 
> the server drops the event, as with 1.5.0.
> * yarn test:servers compare-1.5.0: the requests are identical to those of the 
> published 1.5.0, except for the empty "attributes" no longer sent.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to