There's a description ont he advanced javascript input field that reads:

Paste custom code snippets here. These will be added to every page that SiteCatalyst appears on. For help with this feature see the cutroni.com blog. Do not include the

tags, and always end your code with a semicolon (;).
I dont see any reason why this is here. The link to the custom code snippets is just mean as there aren't really any relavent snippets on that page. And the link the cutroni's blog, well. I cant find anything related to omniture there either.

Comments

ultimateboy’s picture

StatusFileSize
new1011 bytes

If I don't see any backlash soon.. I'm going to simply commit the removal of the description. In the end, I think it's probably best to just remove this field all together. I know I've never used it.

Race.it’s picture

no objection from me to remove the description.

greggles’s picture

Status: Active » Reviewed & tested by the community

This was copy-paste from the google analytics module, I think.

greg.harvey’s picture

Would be useful if the box *did* permit code snippets though (e.g. PHP) ... related: #186237: Sub-module to allow PHP so you can create dynamic Omniture JavaScript variables from the UI

greggles’s picture

I think PHP should live in files, not in the database. There is a hook for site specific modules to add PHP which is the "right" way to do that, IMO.

greg.harvey’s picture

bleen’s picture

I agree that the description needs some serious help ... but I know that we have used the advanced js field from time to time (usually to calculate the value of some obscure var) ...

That said, I think that the patch here #1815866: Add token support for code snippets. would make this field much more useful and the examples in that issue would be much more practical as a description.

Thoughts?

bleen’s picture

Title: Form description for advanced javascript » Add token support and improve description for advanced javascript
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.45 KB

On second thought, I'm going to close the other issue as a duplicate and keep everything here...

This patch adds token support and give some examples in place of a description. Much more useful in my opinion.

bleen’s picture

Status: Needs review » Fixed
StatusFileSize
new2.7 KB

Didn't get much feedback on this one, (I'm sure in part because I resurrected it from the dead) but it clearly makes the advanced javascript field quite a bit more useful as it allows users to add some basic logic directly in the GUI. It also makes the purpose of this field more clear by providing some concrete examples of how it can be used instead of some links that don't really explain anything.

So with that, I went ahead and committed the attached patch (the only difference from #8 was some formatting)

http://drupalcode.org/project/omniture.git/commit/9c19930

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.