Analytics Code

A place to discuss and receive support for the Web Auction application.

Analytics Code

Postby larryweiss » Tue Mar 10, 2009 2:29 pm

Is there any way to include google analytics code?
larryweiss
 
Posts: 3
Joined: Tue Mar 10, 2009 2:18 pm

Postby shannah » Wed Mar 11, 2009 8:47 am

Yes. There are many ways. One way is to just paste the code into the "Custom Footer" field in Auction Settings.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

I am not understang

Postby larryweiss » Wed Mar 11, 2009 10:29 am

I have pasted the code into global_footer.html
and also tried to paste into Dataface_Main_Template.html

Both gave me an error:
Fatal error: Smarty error: [in Dataface_Main_Template.html line 83]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590)

I have searched the files for the words "custom" and "footer"

Also searched the site for: custom footer and custom-footer and custom_footer.

The last turned up something but it looked like I was not to go there.

Thank you for your speedy answer, but can you be a little more descriptive.
larryweiss
 
Posts: 3
Joined: Tue Mar 10, 2009 2:18 pm

Postby shannah » Wed Mar 11, 2009 10:42 am

The errors that you received are due to the fact that javascript uses curly braces as part of its syntax - which trips up smarty.

You can tell smarty to ignore a section by wrapping it in {literal}{/literal} tags. i.e:

Code: Select all
{literal}
... your analytics code here ...
{/literal}


This only applies when placing code in a smarty template. This is not necessary from any other context.

Your idea of putting it in global_footer.html is a fine one.

The alternative I mentioned is done though the web. Log in as admin, click on "Auction Settings" on the left menu. There is a field called "custom footer" (it may be in a section that is default collapsed, but it is there).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby larryweiss » Wed Mar 11, 2009 12:25 pm

That was easy. Thank you.

I have changed %%E2^E20^E208543E%%public_product_list.html.php line 13 to:

getURL('-action=view'); ?>"; onClick="pageTracker._trackEvent('{$product-}', 'Auction');">"

and public_product_list.html line 5 to:

href="{$product->getURL('-action=view')}" onClick="pageTracker._trackEvent('{$product-}', 'Auction');">

Those changes have not interfered with the display of the auction, so I am assuming no harm done. Is that correct and will it work?

By the way:
The beginning of each line of code is truncated. Probably phpbb is having a problem with the whole of the line. It will not display much beyond <li>.


Thank you again.
larryweiss
 
Posts: 3
Joined: Tue Mar 10, 2009 2:18 pm

Postby shannah » Thu Mar 12, 2009 10:43 am

This should be fine. No need to modify the %%E2^E20^E208543E%%public_product_list.html.php file (in the templates_c) directory as this is just automatically generated from the contents of public_product_list.html.

If you want to post HTML code and don't want PHPBB to mess with it you can check the "Disable HTML in this Post" checkbox.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Web Auction Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved