I'm currently trying to integrate Econda tracking in the one page checkout process of a magento webshop with the special requirement that the tracking which is normaly done on the thank-you-page already is done once the customer clicks the place-order-button (between button click and redirect to payment provider or thank-you-page). The tracking code itself is dynamically created by an magento extension and injected as html into the phtml file of the thank-you-page. By loading that phtml the information is sent. Also the order in magento must exists before the tracking code can be injected (means place order button must already be clicked).
Currently I'm trying to create an "invisible" phtml, which is loaded once the customer clicks place-order-button and which contains the tracking code. This page should be shown for some seconds and then forward/redirect to either the payment provider or the thank-you-page. This is where I'm totally lost.
I have an observer on the event that is fired once the order is complete/saved. This observer calls an action within my model. But the model can not load/show a phtml.
How can I load a custom phtml-file once the customer clicks the place-order-button, show this phtml for some seconds, and then dynamically forward to either payment provider or thank-you-page?
The Cart Success page, by its very nature is the place that you should be putting any e-commerce tracking Javascript or markup.
It's the very first thing to be delivered to the browser once all the necessary order processing has gone on in the back end. Delivering them to an interim page for only a few seconds seems cumbersome and ultimately inefficient. It's possible, but it's bad practice.
Do you have any particular reason why the success page is insufficient? I can't seem to find that in your question.
Loading a new block into your success page is an easy process. Learn some more about Layouts and Templates (Maybe try Alan Storm's tutorial here) and use this method.
There would be two more options:
You could add your tracking to the on click event of your button
You could use server side tracking using the econda PHP SDK
Here's how you can add tracking to click events
<script type="text/javascript">
function trackIt() {
window.emosPropertiesEvent({
siteid: "my-site.de",
content: "CONTENT-LABEL"
});
}
</script>
<tag onclick="trackIt();">content</tag>
Be careful using click event tracking in links, it will not work if your page unloads before the tracking event was send.
I could not find the english version of the econda PHP SDK documentation, so sorry, here are the German docs: https://support.econda.de/display/INDE/PHP-Helferklasse
As already mentioned, your thank-you page is the best place to add tracking. An additional reason is, that normally you want to track if a customer really ordered or not. Payment pages are common problems, so it makes no sense to add "order successful" tracking calls before.
Related
I will just provide a hypothetical case to understand the point. Let's assume I am creating a mailing application. If I refresh the data every time the user returns to the main mail list page from viewing a particular mail, is there an advantage to make this navigation on the client side via AJAX? Or does it make more sense to actually navigate to a new url for viewving a particular mail and a separate url for the main page?
The same question applies to other cases such as a shopping website. What are the advantages/disadvantages of making each product page a separate url rather than navigating to that product using AJAX?
With a one page app the navigation after the page load is quicker, and you can add effects for the page change, but if you have a lot of items to show, you should load data about it also, so the other approach should be better.
I am trying to create some tracking events on OXID eShop Framework on a custom module but I can't find any event handlers or something to put the code on some custom pages, without editing the core files. What I want is to make some custom API calls if I am on product page, category page, basket, etc.
Is there any way I can handle this in a custom module?
OXID has no such events or hooks you might know from magento or shopware. You have two options:
1) For running server side php code you need to extend OXID's functions, e.g. render() function for the pages you want to track.
For the product page it would be "details" -> applications/controllers/details.php
category page is "alist.php" and basket is basket.php
2) Make client side api calls with simple JS. You could appent all your js code to a tempalte block (e.g. in header oder footer) and create some if-else logic for different controller classes.
Like here: https://github.com/OXID-eSales/oxideshop_ce/blob/b-5.3-ce/source/application/views/azure/tpl/layout/base.tpl#L32
You could also have a look at any tracking module for google analytics or piwik, they are pretty similar to what you want to do.
I can give you more examples if you want.
Is there a way to create a page in ClickFunnels(https://www.clickfunnels.com/) website and when I submit that page, I need to store the form details in my rails app(into a particular table). Which means I want to display my database in the clickfunnels integrations list. I googled hours but couldn't get much information on this.
can anyone suggest me if you have done this. A reference link also much appreciated.
We couldn't find any way to do this inside clickfunnels itself, if there is a easy way to add custom systems to their integrations I too look forward to seeing those answers. Until then, here's what we did: We just put our custom form on their page and used ajax to send it back out the end point in our system it needed to hand that data too.
Then, since we also needed to submit the same info to click funnels, we build a fake CF form(I think we actually put one on the page, but used CSS to hide it, then filled it out dynamically from our custom form), and call submit on that form, sending the user through the normal click funnels submission process and sending them to the next page in the funnel.
I have installed google adwords tracking on the success.phtml
I am able to track conversion but I am not sure if all conversions are tracked properly. Our payment methods are Paypal Express and Paypal Payment pro where customer pay via credit card on our website. This ensures that every customer hits the success page.
However when I complete the order and check the conversion page source (View Source) I am not able to see the Google conversion tracking code.
Is it normal that in view source the Google conversion tracking code is not visible yet?
Regards,
Steve
When you get to the success page it is displayed. Once you hit view source you are actually making another request to the success page so it technically reloads it. At that point the code is not displayed again because the transaction was already completed (if that worked you could reload the page and track transactions over and over again).
To check to make sure it shows up correctly do an inspect element in chrome or firefox/firebug to see if the code is on the page.
I've just started putting together a Magento module which bypasses the whole Magento checkout process and instead sends the cart details to a 3rd party fulfilment company via XML-RPC.
Not getting anywhere fast and could use a bit of guidance. My understanding is that I should create the module with an observer based on the event triggered by proceeding to checkout. Trouble is I can't work out which event that would be, I've been through the whole massive list here;
http://www.nicksays.co.uk/magento_events_cheat_sheet/
I've tried;
checkout_submit_all_after - fires after order processed successfully
checkout_cart_add_product_complete - fires after product added to cart
checkout_cart_save_before - fires after product added to cart
checkout_type_onepage_save_order - can't get this to fire at all
checkout_onepage_controller_success_action - fires after order processed successfully
I don't know if this means I'll have to create a custom event or if there is an entirely different and much better alternative to what I'm doing. Building and sending the XML I will leave to another question (starting to realise I may have my hands pretty full here) but any tips there gratefully appreciated too.
Thanks for any help.
controller_action_predispatch_checkout_onepage_index should be the event you're looking for. All controllers inherit the preDispatch method which fires a generic event for predispatch, and a specific event based on the requested action path. The controller you want lives in the checkout module and is called onepage with a default action of index.
Review Mage_Core_Controller_Varien_Action::preDispatch() to see the relevant code