Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stuart Paterson 57 posts 228 karma points
    Jun 28, 2017 @ 06:45
    Stuart Paterson
    0

    Method for inputting variable javascript

    Hi,

    Looking for some advice on this one...

    I'm running Umbraco 7.5.11 and I'm looking for a way to provide our UX/content editors with a means to input some variable javascript to a page for A/B testing purposes. (using VWO)

    The script will be unique for each page they want to test and should only be active for that page.

    So far we've run one test on a single page and the javascript has been placed directly in to a template, but is there a way I could create a data type which would allow them to input their custom javascript from VWO and make it active/inactive, without them having access to templates?

    Thanks Stuart

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 28, 2017 @ 08:01
    Alex Skrypnyk
    100

    Hi Stuart

    You can use simple Multiline Textstring property for inserting page specific scripts on the page.

    Just add new property to document type, and render it in the template.

    Your editors will not be able to change templates, just work with this field, add new js or edit it on each page.

    Thanks,

    Alex

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 28, 2017 @ 08:08
    Alex Skrypnyk
    0

    Also, please have a look at this package, it can help - https://our.umbraco.org/projects/website-utilities/personalisation-groups/

  • Stuart Paterson 57 posts 228 karma points
    Jun 28, 2017 @ 09:55
    Stuart Paterson
    0

    Thanks for taking the time to reply Alex

    As it turns out, I just learned after I posted this that we may not have to implement this functionality for our content editors, but it's worth keeping a note of your recommendation in case we do, I'll have a play around anyway.

    I'll also take a look at that personalisation package, as this is on the horizon for us too.

    Thanks again,

    Stuart

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 28, 2017 @ 10:04
    Alex Skrypnyk
    0

    You are welcome, Stuart

    Ask if something, have a great day!

    Alex

Please Sign in or register to post replies

Write your reply to:

Draft