Knowledge Base support case for Likno Web Modal Windows,  abstracted and stripped of all user’s private info.


Initial Email From:
Paolo
Initial Email Subject: Additional code to be added to Modal Windows
Support Case Month: February 2013

Hello,

Sorry for my question but I don't remember if it is possible to add somewhere additional codes (such as the one of Google Analytics or javascript strings used to count accesses to web pages) to the modal windows while creating them with your tool.

Please, let me know.

Kind regards,
Paolo

Reply From: Likno Customer Support

Dear Paolo,

I guess this is possible if you are loading an “external” page into the modal window. Note however that Google Analytics may not work as expected when you try to count framed pages.

I believe the best method to use is to count the page using Google’s JS functions and not with the standard <script> that you embed in the page.

Best Regards, 
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter

Reply From: Paolo

Hi there!

To be more precise, I need to add a <script> line of code working as counter. But as I use your modal windows in order to show images, flash animation, etc. placed into .htm pages to be shown in the modal window, but when i load them online it seems to me that the counter doesn't work.

So, I was asking you if it possible to place the <script> code directly into the modal window layout and not in the .htm external page containing images of flash files.

Please, let me know.

Regards,
Paolo

Reply From: Likno Customer Support

Dear Paolo,

Putting the <script> directly into a modal would probably not work. The best way is through an “external” page.

The thing however is that you cannot simply use the typical code like this:

<script type="text/javascript">

var pageTracker = _gat._getTracker("yourcode");

pageTracker._initData();

pageTracker._trackPageview();

</script>

This will most likely add extra views to the parent page as Google tries to capture the URL at the top of the page.

Instead you should directly use Google’s API like this:

pageTracker._trackPageview('/my_counter_name');

this should work without any problems if you use it within the iframe. Note that you can give any name to the “counter” and it will appear along with your pages in the analytics.

Best Regards, 
Kostas
Likno Customer Support
www.likno.com
Create any type of javascript menu (CSS menu, drop-down menu, sliding menu), button, html tree, modal window, tooltip, accordion, tab, scroller, jQuery slider or design for your websites!
Like us on Facebook – Follow us on Twitter

 

Tags: , , , , , , , , ,