[
https://issues.apache.org/jira/browse/UNOMI-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Serge Huber reassigned UNOMI-1038:
----------------------------------
Fix Version/s: unomi-tracker-1.6.0
Assignee: Serge Huber
> 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)