This guide will help you set up a website using two separate Marker.io accounts. For example, you might use one account for your internal team and another for an external agency you’re collaborating with.
Why Use Two Accounts?
Using two separate Marker.io accounts helps you:
Keep internal and external feedback separate.
Organize issues based on their source (internal team vs. external agency).
Ensure the right team members see only the feedback they need.
Setting Up Your Website with Two Accounts
1. How the System Works
Your website will use URL parameters to determine which Marker.io account should receive feedback.
?agency
→ Sends feedback to the external agency account?internal
→ Sends feedback to the internal team account
Each account has a unique project ID, which you will need to replace with your own. The project IDs shown below are just examples:
Account Type | Example Project ID (Replace with Yours) |
Agency Account |
|
Internal Account |
|
2. Add the Marker.io Script
You need to insert a script into the <head>
section of your website’s HTML. This script will:
Detect whether
?agency
or?internal
is in the URL.Store the selected project ID in the browser’s localStorage (so it stays active across pages).
Use the correct Marker.io account for feedback collection.
Copy and paste this script, but replace the example project IDs with your own:
<script>
function getProjectId() {
const urlParams = new URLSearchParams(window.location.search);
// Assign project ID based on URL parameters
if (urlParams.has('agency')) {
localStorage.setItem('markerProjectId', 'YOUR_AGENCY_PROJECT_ID_HERE'); // Replace with your agency account project ID
return 'YOUR_AGENCY_PROJECT_ID_HERE';
} else if (urlParams.has('internal')) {
localStorage.setItem('markerProjectId', 'YOUR_INTERNAL_PROJECT_ID_HERE'); // Replace with your internal account project ID
return 'YOUR_INTERNAL_PROJECT_ID_HERE';
}
// If no valid parameter is found, return null (no Marker.io project loaded)
return null;
}
// Configure Marker.io with the selected project ID (if any)
const projectId = getProjectId();
if (projectId) {
window.markerConfig = {
project: projectId,
source: 'snippet'
};
}
// Marker.io setup script
... (Insert the rest of the standard Marker.io code here) ...
</script>
3. How It Works
URL Example | Purpose | Assigned Project ID (Replace with Yours) |
| External feedback (agency) |
|
| Internal team feedback |
|
When a user visits a URL with
?agency
or?internal
, the script saves the corresponding project ID.If they navigate to another page without a parameter, the project ID remains stored in their browser.
If no parameter is provided, no Marker.io project will be loaded.
Testing Your Setup
To ensure everything is working, follow these steps:
Test the agency account:
Visit
https://example.com/?agency
Open the browser console (
F12
>Console
)Run:
console.log(localStorage.getItem('markerProjectId'));
Expected output:
YOUR_AGENCY_PROJECT_ID_HERE
Test the internal account:
Visit
https://example.com/?internal
Open the browser console and check again
Expected output:
YOUR_INTERNAL_PROJECT_ID_HERE
Confirm persistence:
Visit
https://example.com/?agency
, then navigate tohttps://example.com/page
Check the stored project ID in the console—it should remain the same
Customizing Your Marker.io Buttons
It is a good idea to give the Marker.io buttons specific names and colors to make it clear which account they belong to:
Agency Feedback Button: Red with the text "Agency Feedback."
Internal Feedback Button: Blue with the text "Internal Feedback."
You can change the button text and colors by following the instructions here: Customize Your Widget Appearance
Additional Notes
Custom Parameters: Want to use different URL parameters? Just change
urlParams.has('agency')
andurlParams.has('internal')
in the script.Browser Compatibility: This method works in all modern browsers that support
localStorage
.