Install our Code Snippet on your website to gain valuable insights into how your audience is interacting with your media outside of Hubs.
🧰 What You Will Need
-
Uploaded content
-
A platform with custom JavaScript capabilities
Step 1 - Navigate to the Install menu in your Settings
Click here to access the Install menu in your Settings or navigate there by clicking your "Profile" icon, clicking "Settings, then clicking "Install" in the menu on the left.
Step 2 - Install the Code Snippet in the HEAD or Header of your site
This first chunk of code is useful for tracking audience data if you embed a Widget, Playlist or the Player on your site. Add the following code to your site where you can insert HEAD code.
<script src="https://cdn.searchie.io/js/client.js"></script>
This will help you collect basic analytics for your media.
Step 3 - Track detailed Audience information
The next step is more advanced, but will allow you to collect any amount of user information you can capture through Searchie. We recommend skipping this part unless you have knowledge working with Javascript or access to someone who does.
Below are two code examples for WordPress and Kajabi that will allow you to collect your audience's names, emails, and other information as they view your embedded Searchie media on your platform. The code snippet from Step 2 is included in both examples so you don't need to install it separately in the step above.
Wordpress
<script type="text/javascript">
window.Searchie = {
team: 'Your unique team ID provided in app',
<?php if ( is_user_logged_in() ): ?>
<?php $current_user = wp_get_current_user(); ?>
user: {
tracking_id: <?php echo $current_user->ID; ?>,
email: "<?php echo $current_user->user_email; ?>",
name: "<?php echo $current_user->display_name; ?> "
}
<?php endif; ?>
};
</script>
<script src="https://cdn.searchie.io/js/client.js"></script>
Kajabi
<script src="https://cdn.searchie.io/js/client.js"></script>
Remember to replace the following code with the unique ID highlighted in the screenshot below.
'Your unique team ID provided in app'
📚 Up Next
-
Auto-process a folder
-
Build a Playlist and embed it in your website.