Virtual Pageview?


#1

Has anyone built a function equivalent to a Google Analytics virtual pageview? Looking to essentially overwrite the URL and page title in what might otherwise be a standard pageview.


#2

You could look at calling trackPageView whenever you are wishing to send the virtual pageview. This allows you to also set a custom title.
snowplow_name_here('trackPageView', 'custom title here');

If you’re also wanting to update the url and referrer you could call the setCustomUrl and setReferrerUrl methods before calling trackPageView

snowplow_name_here('setCustomUrl', 'http://example.com/custompage'); snowplow_name_here('setReferrerUrl', 'http://example.com/'); snowplow_name_here('trackPageView', 'custom title here');