Tagged: google analytics
-
AuthorPosts
-
July 1, 2015 at 10:23 am #466877
Hi,
I would like to enable Enhanced Link Attribution to better understand user behaviour on my website.
I installed the plugin Google Analytics by Yoast and enable the according option to add corresponding tag to my tracking code as it is described in https://support.google.com/analytics/answer/2558867
So far, so good. Apparently I need to add an unique ID to each link on my website. How can I do this in Enfold?
July 2, 2015 at 3:39 pm #467589Hey nicolasstelter!
not sure if I fully understand, because I think every link is unique, isn’t it? Do you mean you want to give the elements in ALB a unique class? if yes have a look at this tutorial: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
But I think you might need to search a plugin for the function you are searching.
Best regards,
AndyJuly 7, 2015 at 11:39 pm #469991I am not quiet sure, what I have to do to make Enhanced Link Attribution work.
Anyways, what I mean is, I need to add an ID by adding id=”xxxx” to the link e.g.
<a href="/info/kontakt/">Ask a Question</a> <a href="/info/kontakt/">Kontakt</a>
<a id="101" href="/info/kontakt/">Ask a Question</a> <a id="102" href="/info/kontakt/">Kontakt</a>
July 8, 2015 at 3:49 pm #470345Hi!
It might be a bit difficult depending on the element your trying to add it to. If your just trying to create simple links in your page content then you could use a codeblock element and paste the HTML inside.
For a button you could create the button and then view your page source and copy the HTML and then paste that inside a codeblock element in your page and add the ID in that way.
Here is an example of what it would look like.
<div class="avia-button-wrap avia-button-center avia-builder-el-28 avia-builder-el-no-sibling "><a id = "buttonID101" class="avia-button avia-icon_select-no avia-color-theme-color avia-size-large avia-position-center " href="http://www.yourdomain.com/mandanten/notare/"><span class="avia_iconbox_title">Notare</span></a></div>
Best regards,
ElliottFebruary 13, 2016 at 2:38 am #582588I’m fiddling around with enhanced link attribution as well. Based on the way Enfold is coded the menu items in the header do not have unique element ids, but, the
<li>
does.`id=”menu-item-5123″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-mega-parent menu-item-top-level menu-item-top-level-2″>
<a href=”http://www.xxxxx.com/products/”><span class=”avia-bullet”></span><span class=”avia-menu-text”>Products</span><span class=”avia-menu-fx”><span class=”avia-arrow-wrap”><span class=”avia-arrow”></span></span></span>`Button classes however do not appear to have element ids as shown below:
`<div class=”avia-button-wrap avia-button-center avia-builder-el-22 avia-builder-el-no-sibling “>
<a href=”http://www.xxxxx.com/products/cps/”><span class=”avia_button_icon avia_button_icon_left ” aria-hidden=”true” data-av_icon=”” data-av_iconfont=”fontello”></span><span class=”avia_iconbox_title”>Browse Products</span>
</a>
</div>`I have only checked these two elements. But if there’s no unique element for things like buttons, and, if for the header all I will get in my GA report is something like
menu-item-5123
(I suspect) then it doesn’t seem all that useful. I’m wondering if it’s even worth implementing.Thoughts?
- This reply was modified 8 years, 8 months ago by Frank.
February 17, 2016 at 3:32 pm #584776@Frank
Not sure what you mean, because menu items do have unique IDs, as shown in the very first part of the code you have posted:id=”menu-item-5123″
As Elliott already explained you can add ID’s via HTML.
Regards,
AndyFebruary 17, 2016 at 8:40 pm #584931The way the DOM is structured the menu items in the header HAVE have unique element ids, but, only at the li level, the order list level. If you open the dev console you can see what I’m talking about.
Buttons and other media elements OTOH do not seem to have unique IDs. I saw the example above of IDs added to text links with HTML. But I’m not sure how that works with say a button. And also not sure if I add the element ID to a button that it will persist through Enfold updates? If not, then it’s simply too much maintenance. and not worth the trouble.
Let me make this clear(er) with a concrete example. I have a Contact page and two links on the same page that link to the Contact page. One link is in the header menu (has unique ID). The other link is in a CTA lower down the page (does not have a unique ID). I am thinking about using enhanced link attribution to tell GA which link the user clicked to go to the contact page. But unless I have a unique ID on the CTA button then there is no point in implementing ELA because it will yield no additional information. Make sense?
- This reply was modified 8 years, 8 months ago by Frank.
February 20, 2016 at 6:53 am #586405Hi!
If you really need to use the button element and add an ID to it, create a temporary page, add the button shortcode, save then view the page. Extract the rendered html tag of the button using the browser’s element inspector. Create another page, add the button’s html tag then apply a unique id attribute to it. Example:
<div class="avia-button-wrap avia-button-center"> <a id="YOUR ID HERE" href="" class="avia-button avia-icon_select-yes-left-icon avia-color-theme-color avia-size-small avia-position-center "><span class="avia_button_icon avia_button_icon_left " aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello"> </span><span class="avia_iconbox_title">Click me</span> </a> </div>
Cheers!
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.