Hi @steve_bowsher this code is implemented in a JavaScript Code extension, rather than in the template of a custom tag.
Within any JavaScript extension, you have access to the "b object" which is a reference to the data object (utag_data) for the event that has been passed.
So you can reference any data field like this:
{ scope:'page', name:'section', value:b.page_name, mobile:true }
Note that it's not in quotes, because you want the value of b.page_name (or whatever data layer value you choose) rather than the literal string "b.page_name".
I hope that helps. I can do this for you, or you can give a go and see how it works out.
Fiann
... View more