Welcome to WebmasterWorld Guest from 54.166.48.3

Forum Moderators: incrediBILL

Message Too Old, No Replies

Possible To Run Multiple Scripts From An Iframe?

     
3:49 pm on Feb 11, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Apr 6, 2005
posts: 219
votes: 0


Weird question here.

I have multiple clients in an industry that have 3rd party website providers. I need to install multiple scripts on their website including:

Analytics Scripts
Conversion Trackers
etc etc

The scripts are mostly pixels, iframes or javascript.

Is there a way that I can make one simple script that i host on and call from my server and then embed any additional scripts within that to use on the clients website?

Effectively this would mean giving the 3rd party web provider 1 script rather then several to install on all of their pages and allowing me to control the removal or implementation of any new pixels/scripts from my own server

I hope I explained that well. Thanks for any help.
5:10 pm on Feb 11, 2010 (gmt 0)

Administrator from US 

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 25, 2005
posts:14650
votes: 94


That really won't work because iFrames load from separate HTML pages therefore your analytics would report the page of content in the iFrame itself, not the page that included the iFrame.

Basically, your analytics would only record a single page being loaded, the one in the iFrame, therefore completely useless.

Does that make any sense?
5:23 pm on Feb 11, 2010 (gmt 0)

Full Member

10+ Year Member

joined:Apr 6, 2005
posts:219
votes: 0


makes sense...what if they were all javascript files...could i embed one js file on the client site, linked back to mine with many sub-scripts?
6:32 pm on Feb 11, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2006
posts:2561
votes: 48


i suppose you could put a load of different query strings onto the end of just one url -- the one that your hosting. and then you could call each script depending on which query strings are there.
1:10 am on Feb 12, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


I'm sure I don't fully understand this question however...

Can you use window.location.hostname with a single script that does whatever it needs to do to change its actions depending on which site is calling it?

Kaled.