Tagged: Analytics, enfold, google analytics, google tag manager, Tracking
-
AuthorPosts
-
September 11, 2015 at 9:05 pm #501878
Where do I put the code to add a click event in a slider in Enfold? I believe I have the correct syntax for the link/event but I have no idea where to put it. the “link” box wont take the extra code. Is this something that gets added to a file that I need to FTP?
September 12, 2015 at 7:42 am #501986Hi elrey52,
What code are you trying to add and to what element? Please post an admin login in the Private Content of your reply. so that we can have a closer look.
Regards,
RikardSeptember 15, 2015 at 12:08 am #503079The slider I am using is basically just a banner. There is an “enter URL” box at the top that makes the whole slider a link. That is what I have always used for the link for this particular slider. In layer 1 of my slider I just have an image. in layer 2 I just have some text.
I have the code for my Click Event but if I put the code in that “Enter URL box” it does not work and there is no link at all for the banner.
I can add the link to the HTML portion of layer 2. then the text associated with the slider becomes a link and fires the Click Event successfully but then only the text is a link, not the entire slider.
I would like for the whole slider to be a link again and fire the click event.
- This reply was modified 9 years, 3 months ago by elrey52.
September 15, 2015 at 6:57 pm #503607Hi!
I checked the URL you have provided and luckily it’s working without editing any host file. The whole banner is clickable for me, so it seems you have fixed it already?
Regards,
AndySeptember 15, 2015 at 7:08 pm #503615no, still not fixed. . I have a production site (same URL) and a test system at the different IP Address. So the URL will work without the host edit but it will be accessing my production site where the banner is currently just a link. I am currently only trying to get the OnClick event working on the test system. Making the banner a link is not a problem but making it work as a link and fire the onclick event is a problem. On my test system the banner is not a link, only the text is and it fires the clickevent.
September 16, 2015 at 11:16 am #503928Hey!
which kind of OnClick event are you referring to? can you show us which code you want to implement? you can use pastebin.com
Regards,
AndySeptember 16, 2015 at 2:39 pm #504133I have pasted the link that is working below .
<a href="http://idealtridon.com/prolok" onClick="ga('send', 'event', { eventCategory: 'banner', eventAction: 'click', eventLabel: 'prolok banner', eventValue: 1});">PROLOK - our new band and buckle product line. A MUST SEE, click here for details.</a>
in the HTML box of layer 2 of the slider the above link works. But if I remove that link from the html portion and put it in the URL box then it doesn’t. I get no link at all when that happens.
my current setup on production site
URL – http://idealtridon.com/prolok (the whole banner is a link)HTML of layer 2 – “PROLOK – our new band and buckle product line…….” (text only)current setup on the test site
URL – (blank)
HTML of layer 2 –<a href="http://idealtridon.com/prolok" onClick="ga('send', 'event', { eventCategory: 'banner', eventAction: 'click', eventLabel: 'prolok banner', eventValue: 1});">PROLOK - our new band and buckle product line. A MUST SEE, click here for details.</a>
– this makes the text a link but not the banner.- This reply was modified 9 years, 3 months ago by elrey52.
September 16, 2015 at 2:47 pm #504144Counting the banner clicks is a hot issue with my marketing department right now so I have moved my “Test” setup into production. So now both sites have the text in the banner as a link which fires the click event. However I am still interested in my initial issue of making the whole banner a link again and firing the clickevent.
- This reply was modified 9 years, 3 months ago by elrey52.
September 22, 2015 at 3:19 pm #507106Hi!
Not sure if it would work but you could try adding your own custom click events.
<script type = "text/javascript"> jQuery('.ls-inner > .ls-slide:nth-child(2)').on('click', function(){ ga('send', 'event', { eventCategory: 'banner', eventAction: 'click', eventLabel: 'prolok banner', eventValue: 1}); }); </script>
If it was me I would just add it to a button in the slide.
Regards,
ElliottDecember 17, 2015 at 9:25 pm #554655Where would this be added? into the HTML code on the slider?
December 22, 2015 at 9:01 pm #556719Hi!
Try putting that in a Code Block below the LayerSlider.
Regards,
JosueJanuary 6, 2016 at 10:04 pm #560785thanks. The code block suggestion helped as I was completely lost on where to put code. I added an ID# to my slider of “Prolok_banner” and then the below code got me working. I also tested with taking the ID off and putting it just on 1 slide of the slider (like just the text instead of the image) so I verified that it works in a variety of manners. Thanks for your help. I had to use part of your solution and some from various google analytic s links as there is no way I would have gotten this working by myself.
<script type = "text/javascript"> jQuery(document).ready(function ($) { $('#Prolok_banner').on('click', function() { ga('send', 'event', 'banner', 'click', 'prolok banner', 1); }); }); </script>
January 6, 2016 at 11:14 pm #560811Just a heads up Google Tag manager with Google analytics and Enfold works really great!
You can add click listeners to execute your events and send it over Google Analytics.
I have been able to track almost 90% of everything pretty easy.Have been asking before how I’m able to add unique identifiers to elements like sliders, Image galleries and submit buttons.
Hope really someone at your awesome support team adds a ticket for this to your backlog so we really can enjoy Enfold with Google Tag Manger to 100% would be so fucking over the top!My best tip for you is to use Google Tag Manager and use the inbuild click listener to generate and event to Google Analytics.
There are so many simple guides on the net how to make this happen for your site. :-)Did a fast search on google : google tag manager event tracking
Maby this yt url can help you out “has not anything to do with me”- This reply was modified 8 years, 11 months ago by apower84.
January 6, 2016 at 11:32 pm #560827Hi @apower84!
You can enable this:
http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/Cheers!
JosueJanuary 7, 2016 at 5:13 am #560992Hi @Josue
Really!!! Got damn mate fantastic! Going to get back on you on this right now to mutch celebrationss bobbs and beer! :-P
Are you the Google Tag Manger / Analytics person to ask about this Q for the Enfold theme?If you marry Enfold and GTM toghter im ready to belive in santa :-D
January 7, 2016 at 10:32 pm #561568You are welcome. Not really, we all know a bit of SEO and related :)
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.