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 answerExample 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 Memory | With Memory |
|---|---|
| Re-specify property IDs every time | Remembered automatically |
| Generic responses | Personalized to your data |
| No historical context | Builds on past conversations |
| Same settings for all projects | Per-project configuration |
| Repeat same mistakes | Learns 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:
- You make a request to the MCP server
- Metrifyr tracks which property you used
- After 5+ queries to the same property, it becomes your default
- Next time, Claude uses it automatically
Opt-out: You can disable automatic learning per API key in Dashboard > Memory.
Managing Memory
View Memory Items
- Go to Dashboard > Memory
- Select an API key from the dropdown
- See all memory items for that key
Add Memory Item
Manually:
- Click "Add Memory Item"
- Fill in key, value, description
- Set priority (optional)
- Set expiration (optional)
- Click "Save"
Via Claude:
Remember that my main GA4 property is 123456789Claude will create a memory item automatically.
Edit Memory Item
- Find the item in the table
- Click "Edit"
- Update fields
- Click "Save"
Delete Memory Item
- Find the item in the table
- Click "Delete"
- Confirm deletion
The item is removed immediately.
Export/Import Memory
Export:
- Select an API key
- Click "Export Memory"
- Download JSON file
Import:
- Click "Import Memory"
- Select JSON file
- Review items to import
- 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 propertyEach 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_789No 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_idnotprop - 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:
- Global memory toggle is ON (header icon)
- Per-key memory toggle is ON (dashboard)
- API key is correct in MCP config
- 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:
- Review memory items in dashboard
- Delete conflicting items
- Adjust priorities
Memory items not saving
Causes:
- Invalid key format (spaces, special characters)
- Hit the limit (50 items on free tier)
Fix:
- Use valid keys: lowercase, underscores, numbers only
- Delete unused items to free up space
See full troubleshooting guide