I’m looking for some copy/paste code that I can use to do some A/B testing on different calls-to-action – images and associated alt tags and links.
What I envision would have some javascript building an array with all the needed details, then randomizing a number to select which item to display <-this part is easy to find all over the web. But what I’d also like is a short and clean way to insert the image into my HTML page. Inserting actual inline JS sometimes throws off page formatting, which I of course want to avoid. Something that can be pasted into any spot of the page, perhaps like <%ShowCTA1()%> (or whatever the proper lingo is) would be awesome.
Anyone have a sample I can take and modify?
Thanks in advance!