Getting Started with the Site Notes Automation

If you’ve ever wanted an easy way to track changes to your site, such as 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 automatically, making it simple to keep your notes up to date.

Follow this guide to learn how to set up and use the Site Notes Automation.

Creating a Site Note

To create a site note, use the exactmetrics_add_site_note() function. This function needs an array with specific key-value pairs. Let’s break down these keys and what each one means:

 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 exactmetrics_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' = 'Updated theme heading',
'author_id'= 1,
'date' = '2024-05-16',
'category_id' = 5,
'media_id' = 10,
'important' = true,

exactmetrics_add_site_note( $args );

That’s it! You’ve successfully created a site note. Now, you can review your site notes within the Site Note Report. For more information, check out the Getting Started with Site Notes guide.