[ 
https://issues.apache.org/jira/browse/UNOMI-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18138190#comment-18138190
 ] 

Serge Huber commented on UNOMI-1038:
------------------------------------

Backported to {{1_x}} for unomi-tracker 1.6.0: 
https://github.com/apache/unomi-tracker/pull/41. Fixed in 2.0.0 (#39) and 1.6.0 
(#41).

> Tracker: sourceLocalIdentifierMap does not find elements whose id starts with 
> a mapped value
> --------------------------------------------------------------------------------------------
>
>                 Key: UNOMI-1038
>                 URL: https://issues.apache.org/jira/browse/UNOMI-1038
>             Project: Apache Unomi
>          Issue Type: Bug
>          Components: unomi-tracker
>            Reporter: Serge Huber
>            Assignee: Serge Huber
>            Priority: Major
>             Fix For: unomi-tracker-1.6.0, unomi-tracker-2.0.0
>
>
> Websites can give the tracker a map of id parts 
> (digitalData.sourceLocalIdentifierMap), used to find the videos and links 
> Unomi tracks when their id in the page differs from the one in Unomi. The 
> mapping is not applied when the mapped part is at the start of the id, and 
> when nothing matches, the tracker looks for an id starting with "undefined". 
> The element is then not tracked.
> Cause: _resolveId uses the result of filter() (always an array) as a string, 
> and checks indexOf(...) > 0 instead of !== -1.
> Fix: use the first matching part, wherever it is in the id. Covered by unit 
> tests.



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

Reply via email to