Push collection with non-url key

I’m looking at updating an existing push implementation to use asset ids as key instead of url. Would it be sensible to push the url as a meta tag, and inject that into liveUrl/displayUrl/indexUrl in a groovy script, in a way that the clickTrackingUrl will end up with the right url?

And if so, any pointers? :slight_smile:

Hey Mr. Cook

It is certainly possible to use the asset id as the key for documents. You will need to then following the instructions on “Enabling click tracking on URLs other than the indexed live url” using the appropriate metadata to generate the URLS. The purpose of doing it this way is to ensure that clicks continue to be recorded by Funnelback. Keep in mind that click tracking (relevance weighting based on popularity) will no longer occur as URLs tracked by the clicks will no longer match the urls in the index (asset ids)

Hope this helps.

Thanks,

~Gioan

Thanks Gioan, this looks perfectly straightforward. But I’m confused by your last sentence – do you mean that relevance weighting will not work due to the liveUrl not matching the index? In that case, why bother using click-tracking at all?

Alternatively, is it possible to hook in a groovy script at push-time? Perhaps it would be better to keep the URL as indexed key and make use of default funnelback behaviour, but then use a designated metadata class as a unique key, and perform duplicate removal by searching and deleting any records that have a matching key.

Oops sorry for the late reply. Completely missed it.

Conceptually, there is a step on the index phase which processes all the “queries” and associated “clicked” URLs and factors that in to be used as part of relevancy. If the “clicked” URLs no longer match what resides in the next, this process no longer occurs and essentially, you have disabled “click tracking ranking” factors.

However, not all is lost. By having click tracking, you still benefit from having the analytics and being able to view this information in the Marketing Dashboard.

In regards to using some other key to remove duplicates, Funnelback only provides you with the APIs to orchestrate that yourself outside the product.

e.g. Write some javascript which queries the push collection, detect any duplicates. For each duplicate document, call the delete API to remove that document from the index.

There isn’t a feature which automatically removes duplicates based on some metadata, unfortunately.

Depending on your problem you may be able to use result collapsing to ‘remove’ some of the duplicates from the results based on a metadata key. This doesn’t actually remove the items but does group them all together in the results, and you can skip over the collapsed items in your template.

ahh forgot about that!..good pickup