If you’ve ever wanted an easy way to track changes to your site—like theme updates, marketing campaign adjustments, or product changes—you can use Site Notes to create an annotation for that day. These notes can be added via the Site Notes Automation, allowing you to effortlessly keep your notes updated automatically.
Follow this guide to learn how to configure and use the Site Notes Automation.
Prerequisites:
- You have a MonsterInsights Agency or higher license.
- You have installed the MonsterInsights plugin.
- You are connected to your Google Analytics account.
Creating a Site Note
To create a site note, you’ll use the function monsterinsights_add_site_note(). This function takes an array with specific key-value pairs. Let’s go over these keys and what they mean:
Array Keys and Values
- description (string): The title or content of the site note. This is required.
- author_id (int): The ID of the person creating the note.
- date (string): The date and time of the note. Use the format Y-m-d H:i:s. If you don’t specify a date, it will default to the current time.
- category_id (int): The term ID from the monsterinsights_note_category taxonomy.
- media_id (int): The attachment post ID. The media needs to be uploaded in the WordPress media library.
- important (bool): Whether the note is important. The default value is `false`.
Example Usage
Here’s an example of how to create a site note using the function:
$args = array( 'note' = 'A sample site note', 'author_id'= 1, 'date' = '2024-05-16', 'category_id' = 5, 'media_id' = 10, 'important' = true, ); monsterinsights_add_site_note( $args );
That’s it! You’ve successfully created a site note. From there, you can now review your Site Notes within the Site Note Report. You can find out more about there within the Getting Started with Site Notes guide.