Skip to content

Get Priority Creative Ids

The getPriorityCreativeIds function is used to retrieve the priority creative IDs set on the tag. It caches the array of creative IDs to localStorage in order to have the fallback in case of failure and defaults to the last used array on start.

const creativeIds = window.htag.api('1').getPriorityCreativeIds();
console.log(creativeIds);