Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating client-side and server-side views using custom dimensions doesn't work for transactions #117

Open
mjgs opened this issue Oct 13, 2018 · 1 comment

Comments

@mjgs
Copy link

mjgs commented Oct 13, 2018

I'm trying to setup 2 views, 1 to show client-side analytics and 1 to show server-side analytics.

In the server side analytics code I set a custom dimension to a text string (there is a list of allowed strings).

Then in the UI I setup filters that use the custom dimension to either exclude all the strings (client-side) or include some/all of the strings (server-side) traffic in the view.

I find that it works great for events and pageviews but it doesn't work for transaction analytics.

I've tried adding the custom dimension to the transaction and/or the item object:

req.visitor.transaction({
	transactionId: 'trans-12345',
	transactionAffiliation: '',
	transactionRevenue: 500,
	transactionShipping: 50,
	transactionTax: 100,
	cd1: 'custom-dimension-name-from-allowed-list'
}, {
	itemName: 'item-54321',
	itemPrice: 500,
	itemQuantity: 1,
	itemCode: 1,
	itemCategory: 'category-12345',
	cd1: 'custom-dimension-name-from-allowed-list'	
}).send();

So the only way to display transaction analytics is in the client-side view (by not excluding the transaction custom dimension strings), which isn't great because it's really server-side analytics.

Looking at the code it seems like the library just passes the custom dimension directly to google in the params object.

In the google UI view E-commerce Settings I have both settings set to On:

  • Enable E-commerce
  • Enable Enhanced E-commerce Reporting

Reading this tutorial it seems the enhanced setting is necessary for product level dimensions such as transaction ID.

Is it possible to add a custom dimension to a transaction and then create filters in the UI that use that dimension? And if it isn't, is there another way to create the client-side and server-side views?

@mjgs
Copy link
Author

mjgs commented Oct 15, 2018

I checked this again today and the data has started to filter into the views as expected. I thought 3-4 hours was enough to wait but it took 24 hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant