> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: setActivityCounters(memberId: string, counter: Counter) # Method package: wixActivityCountersV2 # Method menu location: wixActivityCountersV2 --> activityCounters --> setActivityCounters # Method Link: https://dev.wix.com/docs/velo/apis/wix-activity-counters-v2/activity-counters/set-activity-counters.md # Method Description: Sets activity counters for a requested site member. If the counter does not already exist, it will be created. Counters are identified with a custom key, which must be unique. > **Note**: Make sure to pass a `memberId` and not a `contactId` to identify the member. Any relationship between a member's `memberId` and `contactId` is coincidental. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## setActivityCounters example for dashboard page code ```javascript import { activityCounters } from 'wix-activity-counters.v2'; async function setActivityCounters(memberId, counter) { try { const result = await activityCounters.setActivityCounters(memberId, counter); return result; } catch (error) { console.error(error); // Handle the error } } ``` ## setActivityCounters example for exporting from backend code ```javascript import { activityCounters } from 'wix-activity-counters.v2'; import { webMethod, Permissions } from 'wix-web-module'; import { elevate } from 'wix-auth'; const elevatedSetActivityCounters = elevate(activityCounters.setActivityCounters); export const setActivityCounters = webMethod( Permissions.Anyone, async (memberId, counter) => { try { const result = await elevatedSetActivityCounters(memberId, counter); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---