How to simply add one custom parameter to "trackPageView"?

81 views
Skip to first unread message

Gaultier Boniface

unread,
Aug 31, 2015, 5:31:24 AM8/31/15
to Snowplow
Hello,

I'm tracking page view events on a Wordpress website and I would like to know how I can add a simple "page_id" parameter to the tracked data? I'm using Google Tag Manager to send this in the dataLayer array but what to do after that on the snowplow side?

Is there a way to add a custom parameter somehow or must I use the "custom contexts" and start a private Iglu server?

Thanks for your answer.

Gaultier Boniface

unread,
Aug 31, 2015, 5:36:00 AM8/31/15
to Snowplow

Alex Dean

unread,
Aug 31, 2015, 6:13:29 AM8/31/15
to Snowplow
Hi Gaultier,

It sounds like you want to attach custom metadata to your page views. The way to do this with Snowplow is to create a com.omenabler/web_page JSON Schema, add it to your own Iglu server and use Schema Guru to create a dedicated JSON Paths file and Redshift table.

Cheers,

Alex

On Mon, Aug 31, 2015 at 10:36 AM, Gaultier Boniface <g.bon...@omenabler.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Snowplow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snowplow-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Co-founder
Snowplow Analytics
The Roma Building, 32-38 Scrutton Street, London EC2A 4RQ, United Kingdom
+44 (0)203 589 6116
+44 7881 622 925
@alexcrdean

Gaultier Boniface

unread,
Aug 31, 2015, 6:32:50 AM8/31/15
to Snowplow
Hello Alex,

As always thanks for your fast answer! ;)

I will take a look at all this in the next days.

Cheers. 

Bernardo Srulzon

unread,
Aug 31, 2015, 3:32:47 PM8/31/15
to Snowplow
​Gautier, Alex - 

We're going through the same implementation right now - we need to add "page_type" to our page views. I was implementing it as a custom context to 'trackPageView', but just realized that "page_type" is only pushed to the data layer after the initial ​'trackPageView' call. Two questions:

1. Can I call 'trackPageView' again (with the page_type custom context) once all information is available on the data layer, without the risk of generating duplicate page views?
2. If not, is unstructured events the way to go? It would mean having an unstructured event for each page view.

Thanks!
Bernardo

Alex Dean

unread,
Aug 31, 2015, 5:42:33 PM8/31/15
to Snowplow
If you call trackPageView again, the page view will get sent twice.

You could send an unstructured event as soon as page_type is available - but why not just delay your trackPageView and send that when page_type is available instead?

A

Bernardo Srulzon

unread,
Sep 1, 2015, 10:44:29 AM9/1/15
to Snowplow
That makes a lot of sense. Thanks!
Reply all
Reply to author
Forward
0 new messages