The only problem was I used pipe characters in the string that was returned by my modified ActivityMap link function.Might be nice if this was noted in the documentation that suggests editing the link and region function...
According to Adobe documentation here https://marketing.adobe.com/resources/help/en_US/analytics/activitymap/activitymap-link-tracking-use-case.htmlyou can differentiate links by editing the link and region functions of ActivityMap.I have done so, and after changing the output of the link and region...