-
Notifications
You must be signed in to change notification settings - Fork 33
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
Implement Piwik Ecommerce tags #7
Comments
Hi! This is a very nice idea, but it should be more flexible in terms of configuration. Right now I am working on an extension for the view helper to provide access to the JavaScript Tracking API. It might look like this:
This will output JavaScript for both tracking options (async/sync). If you have any comments on this implementation I'd be happy to hear them. I am not quite sure how to make this accessible via the controller, but I'll figure something out. To answer your questions: Yes, this certainly is a feature I'd like to see implemented. I will push my current implementation (as described in the snipped) in a few days. Introducing another view (especially one that is conflicting the |
First off: I'll wait untill you have pushed your implementation, so I can make the ecommerce-tags use the same syntax, DSL and templates. I like the block-approach, but I think for many of the variables, the view is the wrong place to pass them on to the tag, not? Would it not be better to build the tag in the controller at that?
This goes for the e-commerce tags for sure: many of the variables are conditionally set, calculated and prepared in one or more of the various controllers. It would become really messy if I had to have code in
It seems cleaner to me, to determine these tags in the controller(s) and push them into the piwik-tag from there. But then again, I am not extremely familiar with the exact boundiies of what belongs in a controller, view or even model :) edit clarified my "messy" code my expanding it into a more realistic example. |
is somewhat of an issue. Specified the API in a huge data structure for now. If you know some better way to do this, let me know. method_missing is used to check whether a method exists, validate the arguments and add it to list. The list will be converted to valid JS calls (based on use_async?) and rendered out for piwik_tracking_tag. refs #7, #10
@berkes I'll push the first refined version of the DSL tomorrow. It would be great if you could take a look at it and tell me if that allows you to implement ECommerce Tracking easily. I'm open to suggestions! |
Thanks for all the work; I am not sure if I can evaluate the code tomorrow, but I will get back ASAP. |
Take your time - I am not very happy with the code anyways (see branch dsl btw.), some parts are still missing. |
Hi there, for a rails/spree ecommerce site, I am implementing piwik e-commerce tags.
They would be optionally: as in: you can toggle them on in your
piwik.yml
and after enabling, push ecommerce variables into the tags from your controllers. As outlined in the usage chapter in the Readme.A few questions beforehand:
The text was updated successfully, but these errors were encountered: