Skip to content

Instantly share code, notes, and snippets.

@Yodapp
Created Mar 11, 2018
Embed
What would you like to do?
How to include UserGuiding in Wordpress admin area
/**
* LOAD USERGUIDE ON ADMIN AREA
*/
add_action( 'admin_enqueue_scripts', function() {
wp_enqueue_script( 'userguiding', get_template_directory_uri() . '/userguiding.js', false );
} );
(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