Metrifyr
Features

Memory System

Persistent AI context that remembers your preferences

Memory System

The Metrifyr memory system stores context that persists across AI conversations, making Claude smarter about your specific setup and preferences.

What is Memory?

Memory allows the MCP server to remember things like:

  • Default GA4 properties - "Use property 123456789 when I ask about traffic"
  • Common date ranges - "I usually analyze the last 7 days"
  • Preferred metrics - "Show me users, sessions, and pageviews by default"
  • Custom preferences - "I prefer mobile data over desktop"
  • Past mistakes - "Don't query property X, it's test data"
  • Language - "Show numbers in Czech format (space thousands separator)"

Each API key has its own memory, enabling different configurations for different projects or environments.

How It Works

Claude asks question

MCP Server authenticates (API key: abc123)

Metrifyr retrieves memory for key "abc123"

Context injected into system prompt

Claude gets personalized context

Better, more relevant answer

Example without memory:

You: "Show me traffic for last week"
Claude: "Which GA4 property would you like me to query?"
You: "Property 123456789"
Claude: [shows data]

Example with memory:

You: "Show me traffic for last week"
Claude: [immediately shows data from property 123456789]

Benefits

Without MemoryWith Memory
Re-specify property IDs every timeRemembered automatically
Generic responsesPersonalized to your data
No historical contextBuilds on past conversations
Same settings for all projectsPer-project configuration
Repeat same mistakesLearns from errors

Memory Architecture

Memory is tied to API keys, not users. This design enables:

Separate contexts per project:

  • Production API key → Production GA4 properties
  • Staging API key → Staging properties
  • Development API key → Test properties

Per-client preferences:

  • Claude Desktop key → "I prefer desktop data"
  • Cursor IDE key → "I prefer mobile data"

Team isolation:

  • Each team member has their own key with their own preferences

Two-Level Toggle System

Memory has a two-level toggle for flexibility:

1. Global Toggle (Header)

Master switch for all memory across all API keys.

When enabled:

  • Memory items are sent to MCP server (if per-key memory is also on)
  • AI gets personalized context

When disabled:

  • No memory items are sent (even if per-key memory is on)
  • Useful for testing without context

Toggle location: Header icon (🧠)

2. Per-Key Toggle (Dashboard)

Enable/disable memory for specific API keys.

When enabled (and global is on):

  • Memory items for this key are sent to MCP server
  • AI gets context specific to this key

When disabled:

  • Memory items are stored but not sent
  • Useful for temporarily disabling context

Toggle location: Dashboard > Memory

Memory is active only when BOTH toggles are enabled.

Memory Items

Memory consists of key-value pairs with metadata:

Item Structure

{
  "key": "default_property_id",
  "value": "123456789",
  "description": "My main website GA4 property",
  "priority": 10,
  "expiresAt": null
}

Fields:

  • key - Unique identifier (e.g., "default_property_id")
  • value - The data to remember
  • description - Human-readable explanation
  • priority - Higher priority overrides lower (1-100)
  • expiresAt - Optional expiry date (null = never expires)

Common Memory Items

GA4 Properties:

default_property_id = "123456789"
default_property_name = "My Website"

Date Preferences:

default_date_range = "last_7_days"
timezone = "America/New_York"

Metrics:

preferred_metrics = "users,sessions,pageviews,bounceRate"
preferred_dimensions = "date,deviceCategory,country"

AdSense:

default_account_id = "pub-1234567890"
currency_preference = "USD"

Language:

language = "cs"
number_format = "cs-CZ"

Exclusions:

ignore_properties = "987654321,111111111"
ignore_domains = "test.example.com,staging.example.com"

Automatic Learning

The memory system can learn automatically from your usage:

What gets learned:

  • Properties you query most often
  • Common date ranges you use
  • Typical metrics you request
  • Errors you've encountered (to avoid repeating)

How it works:

  1. You make a request to the MCP server
  2. Metrifyr tracks which property you used
  3. After 5+ queries to the same property, it becomes your default
  4. Next time, Claude uses it automatically

Opt-out: You can disable automatic learning per API key in Dashboard > Memory.

Managing Memory

View Memory Items

  1. Go to Dashboard > Memory
  2. Select an API key from the dropdown
  3. See all memory items for that key

Add Memory Item

Manually:

  1. Click "Add Memory Item"
  2. Fill in key, value, description
  3. Set priority (optional)
  4. Set expiration (optional)
  5. Click "Save"

Via Claude:

Remember that my main GA4 property is 123456789

Claude will create a memory item automatically.

Edit Memory Item

  1. Find the item in the table
  2. Click "Edit"
  3. Update fields
  4. Click "Save"

Delete Memory Item

  1. Find the item in the table
  2. Click "Delete"
  3. Confirm deletion

The item is removed immediately.

Export/Import Memory

Export:

  1. Select an API key
  2. Click "Export Memory"
  3. Download JSON file

Import:

  1. Click "Import Memory"
  2. Select JSON file
  3. Review items to import
  4. Click "Import"

Useful for:

  • Backing up memory items
  • Sharing setup between API keys
  • Migrating to a new account

Memory Limits

Free tier:

  • 50 memory items per API key
  • Items never expire unless manually deleted

Pro tier (coming soon):

  • Unlimited memory items
  • Advanced analytics on memory usage
  • Automatic cleanup of unused items

Privacy

What's stored:

  • Key-value pairs you create
  • Automatic learning data (properties, metrics)
  • Created/updated timestamps

What's NOT stored:

  • Your actual GA4 data
  • Query results
  • Conversation history

Memory items are only used to improve context - they're never shared with other users or third parties.

Use Cases

1. Multi-Client Agency

You manage 10 client websites:

API Key "Client A" → Memory: property_id = A's GA4 property
API Key "Client B" → Memory: property_id = B's GA4 property
API Key "Client C" → Memory: property_id = C's GA4 property

Each client's Claude session automatically uses the right property.

2. Multi-Environment Setup

You have dev, staging, and production:

API Key "Production" → Memory: property_id = prod_123, ignore_domains = "test.com,staging.com"
API Key "Staging" → Memory: property_id = staging_456
API Key "Development" → Memory: property_id = dev_789

No risk of mixing up environments.

3. Personal Preferences

You prefer certain metrics and formats:

Memory:
  preferred_metrics = "users,sessions,conversions"
  number_format = "en-US"
  date_range = "last_30_days"
  exclude_internal_traffic = "true"

Claude always uses your preferences without you asking.

4. Team Collaboration

Team members work on the same project but with different focus:

Team Member A (SEO) → Memory: focus_dimensions = "landingPage,keyword,country"
Team Member B (Ads) → Memory: focus_dimensions = "campaign,source,medium"

Each person gets relevant default views.

Best Practices

Do:

  • Use descriptive keys: default_ga4_property_id not prop
  • Set priorities: Important items = high priority (90+)
  • Add descriptions: Future you will thank you
  • Review periodically: Delete unused items

Don't:

  • Store sensitive data: API keys, passwords, PII
  • Use generic keys: value1, data, test
  • Set everything to high priority: Defeats the purpose
  • Let memory grow unbounded: Clean up old items

Troubleshooting

Memory not working

Check:

  1. Global memory toggle is ON (header icon)
  2. Per-key memory toggle is ON (dashboard)
  3. API key is correct in MCP config
  4. MCP client was restarted after enabling

Wrong data being used

Causes:

  • Old memory item with high priority
  • Multiple items with same key (highest priority wins)

Fix:

  1. Review memory items in dashboard
  2. Delete conflicting items
  3. Adjust priorities

Memory items not saving

Causes:

  • Invalid key format (spaces, special characters)
  • Hit the limit (50 items on free tier)

Fix:

  1. Use valid keys: lowercase, underscores, numbers only
  2. Delete unused items to free up space

See full troubleshooting guide

Next Steps

On this page

Memory System | Metrifyr Docs | Metrifyr