1 / 5
Jan 2016

In the ongoing quest to get accurate conversion tracking I have finally Facebook reps working with me and going over code. They noticed that the tracking pixels are not between <head> and </head> as called for and that they should be. They are concerned that some of the errors showing up are because the code is not in the specified place.



Tracking codes are generally called to be in header or footer and appears there is no way to put them there. Please look into this. Conversions are the key to many of our sales and we need to eliminate all possibilities. Why ius the admin placing our custom code in the main body and how can we address it?



Gav

  • created

    Jan '16
  • last reply

    Jan '16
  • 4

    replies

  • 1.5k

    views

  • 2

    users

  • 2

    links

We have no way to insert custom code in the HEAD section of thank-you pages we generate. The positions where custom thank-you page HTML gets inserted is hard-coded in our backend routines which generate the page. Common Thank-you Page HTML (from Edit Preferences) gets inserted at the very end of the page just before the </body> tag. Product Thank-you Page HTML (from each product's settings) gets inserted after the name of the product. These insertion points are fixed and cannot be altered.



If you require tracking code in the HEAD, we would recommend redirecting to a Common Thank-you Page URL on your site where you can do so. You can embed your E-junkie-generated thank-you page content (including download links) within your site's thank-you page by following the instructions here:

1http://www.e-junkie.com/ej/tips.redirection.download-link.htm1



This page offers further tips you may find useful:

http://www.e-junkie.com/ej/tips.tracking.conversions.htm

The head is the basic proper form for all such code insertion I don't understand why this would be designed in a manner that is not compliant with coding standards.

Typically javascript can be inserted in either the HEAD or the BODY; the latter is usually recommended whenever possible, and ideally as close to the end as possible (just before the </body> tag), so page display doesn't get stalled waiting for the script to load and execute, which can happen when it's in the HEAD or higher up in the BODY.



Specific technicalities of a given script can require it to be loaded in at a certain point in the page, but typically this pertains to positioning within the BODY. I don't know why FB may require theirs to be placed in the HEAD, or whether they merely recommend that for some reason rather than it being a strict technical requirement, but that placement is hardly a universal "coding standard". We'll post a request to our wishlist requesting an option for HEAD placement at some point in the future, but we cannot estimate when or even if that request could be implemented.

I tend to agree that it does not effect it much. The problem is that when dealing with third parties that tend to want the guidelines followed explicitly during troubleshooting and we have no way to do that.



Thanks.