GTM custom dimension for virtual page view template

Hello,

The GTM template for sending virtual page views does not give the option to set a custom dimension. While it is available in the templates for sending events and goal conversions.

Is it possible to add this option?

Thanks in advance! :slightly_smiling_face:

Hello @Thomas_Anode_FR

Thanks for the feedback - I will let the team know about this.

A workaround for now - you can try to use Set custom dimensions template and send it with virtual page view, with the same trigger. Just remember to set it to run before virtual page view tag.

Or second option you can use manual virtual page view script with custom html:

<script type="text/javascript">
    var _paq = _paq || [];
    _paq.push(['setCustomUrl', {{ Page Url }}]);
    _paq.push(['setDocumentTitle', {{ Page Title }}]);
    _paq.push(["setCustomDimensionValue", 1, '{{Custom value 1}}']);
    _paq.push(['trackPageView']);
</script>
1 Like