I need to pass the pagePath value dynamically into my amp-analytics tag's var value. Can you please advise how i can achieve this. For example, In the below code snippet , I need to replace the pagePath with different values based on the current page path.
<amp-analytics config="https://www.googletagmanager.com/amp.json?id=xxxxxxxxx>m.url=SOURCE_URL" data-credentials="include"
<script type="application/json">
{
"vars" : {
"pagePath" : { Needs to be passed dynamically }
}
}
</script>
<amp-analytics>