Wordpress
This guide shows you how to integrate SiteCockpit with Wordpress. You can choose between different integration methods: via plugin or directly using a child theme. The goal is to embed your personal SiteCockpit Embed Code correctly into your site.
SiteCockpit-Plugin
Install the SiteCockpit Plugin
Go to your WordPress plugin directory and search for “SiteCockpit”.
Download the plugin and install it through your plugin management interface.
Activate the Plugin
Once installed, activate the plugin from the plugin overview.
Add Your Integration Key
Navigate to the SiteCockpit Key section under your WordPress settings.
Insert your personal Integration Key, which you’ll find in your SiteCockpit dashboard.
The plugin integration is now complete.
Integration via Child Theme (Without Plugin)
If you'd prefer not to use external plugins, you can embed SiteCockpit by editing your WordPress child theme directly.
To ensure update safety, always use a child theme instead of modifying the main theme directly.
Prepare the Child Theme
Go to Appearance → Themes in WordPress.
Make sure the main theme you want to extend is currently active.
Create a new local folder with the following two files:
style.cssfunctions.php
style.css
You could paste the following content into your style.css file:
/*
Theme Name: Spike Business Child
Template: spike-business
Version: 1.0
Description: Child Theme for Spike Business
Author: Your Name
*/
Your theme and template may not necessarily match the example shown! Make sure that everything is labeled correctly!
functions.php
Now add the following to your functions.php file:
<?php
add_action('wp_enqueue_scripts', function() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
});
add_action('wp_footer', function() {
echo '<script type="module" src="https://cdn.sitecockpit.com/cdn/app.js" data-easy-vision-key="cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx9"></script>';
});
Replace the Embed Key with your personal SiteCockpit key.
Upload the Theme
Compress the folder as a .zip file.
Go to Appearance → Add Theme in WordPress and upload your newly created child theme.
Activate the Theme
After uploading, activate the theme.
Go back to the theme overview to make sure your child theme is listed as Active.
SiteCockpit is now successfully embedded via child theme.