Understanding the Challenge
By default, SFMC’s Data Views only provide access to the last 6 months of data. To retrieve data beyond this time limit, teams need to explore alternative solutions. One approach is to use WSProxy to retrieve tracking data since account inception.
Using WSProxy to Retrieve Tracking Data
WSProxy is a powerful tool that allows developers to access SFMC’s API and retrieve data programmatically. To retrieve historical email tracking data, teams can use WSProxy to fetch data in chunks, using pagination to avoid timeouts and high processing levels.
However, as noted by community members, this approach can be complex and require significant scripting efforts. Teams may need to split their scripts into smaller chunks, setting date ranges for each script to avoid timeouts and high processing levels.
wsproxy_example.js
var prox = new WSProxy();
var options = {
"jobID": "YOUR_JOB_ID",
"startDate": "2022-01-01",
"endDate": "2022-01-31"
};
var result = prox.retrieveTrackingExtract(options);
console.log(result);
Root Cause
The root cause of this challenge is the default 6-month data retention limit in SFMC’s Data Views. To access data beyond this limit, teams need to use alternative solutions like WSProxy.
Best Practices
Checklist for Retrieving Historical Email Tracking Data
- Use WSProxy to retrieve tracking data since account inception
- Split scripts into smaller chunks to avoid timeouts and high processing levels
- Set date ranges for each script to fetch data in chunks
- Use pagination to fetch large datasets
- Test and optimize scripts to ensure data accuracy and performance
Frequently Asked Questions
What is WSProxy?
WSProxy is a powerful tool that allows developers to access SFMC’s API and retrieve data programmatically.
How do I use WSProxy to retrieve tracking data?
You can use WSProxy to fetch data in chunks, using pagination to avoid timeouts and high processing levels.
What are the limitations of using WSProxy?
WSProxy can be complex and require significant scripting efforts. Teams may need to split their scripts into smaller chunks to avoid timeouts and high processing levels.
Can I use Data Views to retrieve historical email tracking data?
No, Data Views only provide access to the last 6 months of data. To retrieve data beyond this time limit, teams need to use alternative solutions like WSProxy.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.