Expand my Community achievements bar.

shawncreed1
shawncreed1
Offline
Type
  • All
  • Questions
  • Discussions
  • Ideas
  • Blogs
Filter by user contributions
  • We are looking at some ways of making this a built-in feature in the engine. There are a few things that make this tricky to implement in a way that works for everyone.However, in the meantime, you can create a function similar to the following:function getAnalyticsAccount() { for(var toolid in _sat...

    Type

    Questions

    Views

    1.3K

    Like

    1

    Replies

    0
  • You would simply use 'this' in custom code to reference the object that was targeted by the rule.  So, for example, if you wanted to get the title attribute of the link referenced in your example above, you could use custom code like:var linkTitle = this.getAttribute("title");Hope this helps!-Shawn

    Type

    Questions

    Views

    879

    Likes

    0

    Replies

    0
  • Ryan,All of the rules run in-browser, so yes, it would return the code client-side.  However, I would ask you to reconsider the idea that it would be bad for performance.  If you use our default option of non-sequential HTML/Javascript to inject the tag, then it will run in parallel with the rest of...

    Type

    Questions

    Views

    693

    Likes

    0

    Replies

    0
  • Craig,It's possible to do this using the CSS selector syntax in an event-based rule.  Set the event type to "element exists", and then use a selector like this:div.hiddendiv[style*='display:block']What this example does is looks for a div with a class of 'hiddendiv', and makes sure that the style in...

    Type

    Questions

    Views

    1.2K

    Likes

    0

    Replies

    0
  • Stew,Unfortunately IP address is not exposed directly in the browser via HTML/Javascript for security reasons. The only way that DTM could use IP address is if your site actually set the user's IP address in a Javascript variable on every page, or if you used an AJAX call to an outside server to get...

    Type

    Questions

    Views

    1.1K

    Likes

    0

    Replies

    0
  • All Analytics tools will fire on every page regardless, at least for a basic page view call, even if you haven't configured any rules. (Just the same as it would if you did a base Analytics implementation without TMS and didn't set any page-level variables but only had the s.t() call.)If you want to...

    Type

    Questions

    Views

    1.0K

    Like

    1

    Replies

    0
  • David,Did you have the script set to Javascript instead of HTML?  If so, that might be why: the code you pasted above includes HTML elements so it would cause the Javascript parser to throw up an error.That said, simply pasting your old code into DTM may work, but it's not the best way to make use o...

    Type

    Questions

    Views

    1.3K

    Likes

    0

    Replies

    0
  • Jens,The main reason we haven't put a lot of documentation around the data layer is because we don't require any specific standard or format.  Anything that's in the DOM (HTML, CSS, or Javascript) can be referenced in DTM and used to populate data elements.For example, let's say you had a Javascript...

    Type

    Questions

    Views

    1.3K

    Likes

    0

    Replies

    0
  • Data elements are locally scoped, which means that you would need to prefix this with "window." to access the right object.If you update your code to the following, it should work:if(window.location.pathname){  return window.location.pathname;}else  return '';-Shawn

    Type

    Questions

    Views

    2.0K

    Like

    1

    Replies

    0
  • Garry,Setting s.linkTrackVars or s.linkTrackEvents can be accomplished via the "Custom Page Code" editor in the Adobe Analytics section of a rule.  Keep in mind that the Custom Page Code editor has its own Javascript scope, so you need to make sure that the 's' object is available to your code befor...

    Type

    Questions

    Views

    1.4K

    Likes

    0

    Replies

    0
Sort by
  • Recently earned
  • Unearned first
  • A-Z
  • Z-A
Show more