I'm trying to put the Rudderstack SDK together in ...
# support
p
I'm trying to put the Rudderstack SDK together in a way that captures all available page view information -- more specifically, the information it's capable of grabbing on all pages without having to define a tracking event or run an identity call. I'm still not seeing 'keywords' and such populate correctly. Can someone please tell me if this SDK setup looks right (other than the missing key and url): <script type="text/javascript"> !function(){var e=window.rudderanalytics=window.rudderanalytics||[];e.methods=["load","page","track","identify","alias","group","ready","reset","getAnonymousId","setAnonymousId","getUserId","getUserTraits","getGroupId","getGroupTraits","startSession","endSession"],e.factory=function(t){return function(){e.push([t].concat(Array.prototype.slice.call(arguments)))}};for(var t=0;t<e.methods.length;t++){var r=e.methods[t];e[r]=e.factory(r)}e.loadJS=function(e,t){var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.rudderlabs.com/v1.1/rudder-analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a)},e.loadJS(), e.load("[myrskey]","[myrsurl]"), e.page()}(); </script> <script> rudderanalytics.page(); </script>
h
I'm still not seeing 'keywords' and such populate correctly.
Looks ok - what do you mean by keywords
p
Thanks @hundreds-lifeguard-65770. keywords as listed here: https://www.rudderstack.com/docs/event-spec/standard-events/page/#properties
When I connect that javascript event to my S3 destination, I'm not seeing keywords as a column. I'm also seeing google.com as an example referring domain, but not something like https://www.google.com/search?q=example+search. Any reason that might be?
Also, should it be window.rudderanalytics.page(); or just rudderanalytics.page(); for that second script? Am I missing anything like curly brackets or spaces?
h
rudderanalytics should be fine as its on the window - you dont need to call it again though as it is already called
Google search clicks go through an intermediate URL that removes the keywords iirc
p
Ah, I see. So there's no way to get that then since they remove it. Good to know. Any reason you can think of why the 'keywords' column might not be showing up? Maybe because it has only contained null values to-date since it's not picking up search terms yet?
h
in the sdk js I cannot see any 'keywords' implementation
p
Hmm, see what I'm referring to at least in the docs here: https://www.rudderstack.com/docs/event-spec/standard-events/page/#properties Clearly a keyword property that's an array.
It also says "This property is not automatically collected". Can you think of how I might add that property to what is being collected?
h
I would just parse the referrer in the warehouse or in a transform
p
How about these contextual fields: https://www.rudderstack.com/docs/event-spec/standard-events/common-fields/#contextual-fields Do I need to add them somewhere for things like campaign utm stuff to be picked up.
h
nope that should come through automatically
image.png
p
Thanks @hundreds-lifeguard-65770. Last question that comes to mind; what's the best way to add a client ID variable of some kind to what's being tracked, for the SDK itself? Meaning, if I want to pass through an extra variable on all events fired by this to append an extra column, and every time have the field be "xyz123" (same ID on every event fired from this particular tag), where would I put that?
h
rudder adds a unique identifier in
k
CC <!subteam^S04QT1G74Q3|@sdk-team>