Created
March 11, 2018 15:01
-
-
Save Yodapp/e20f73644e303835f17fb691fa68bebc to your computer and use it in GitHub Desktop.
How to include UserGuiding in Wordpress admin area
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* LOAD USERGUIDE ON ADMIN AREA | |
*/ | |
add_action( 'admin_enqueue_scripts', function() { | |
wp_enqueue_script( 'userguiding', get_template_directory_uri() . '/userguiding.js', false ); | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (u, s, e, r, g) { | |
u[r] = u[r] || []; | |
u[r].push({ | |
'ug.start': new Date().getTime(), event: 'embed.js', | |
}); | |
var f = s.getElementsByTagName(e)[0], | |
j = s.createElement(e); | |
j.async = true; | |
j.src = 'https://static.userguiding.com/media/user-guiding-' | |
+ g + '-embedded.js'; | |
f.parentNode.insertBefore(j, f); | |
})(window, document, 'script', 'userGuidingLayer', 'XXXXXXXXXXXX'); | |
// REPLACE XXXXXXXXXXXX WITH CORRECT CODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment