Web Version links via the API

Hi everybody,

I'm a new member to the forum, but my company has been reselling the Campaign Monitor service to our clients for some time now. I'm a developer so I love using the API on clients' websites for custom subscription forms, listing recent campaigns, etc.

One problem I've run into a couple times is showing links to the web versions of recent campaigns. Is there a way to get these links via the API? Thus far I've had to parse the copy & paste "Recent Campaigns" script to get the links, but I think there should be an easier way. Is there something I've overlooked, or do you plan to add this as a feature in the future?

Thanks,

Mike Green
Fifth Room Creative / Campaign Five

Mathew Mathew, 6 years ago

Hi Mike,

Thanks for the feedback. Right now it is not possible via the API but we will certainly record it as a feature suggestion to consider for the future.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
stephenatgendall, 6 years ago

This is a feature I'd really like too.

Our client used to mail out newsletter pdfs which were added to their website.

Now they'd like to switch over to campaign monitor, but in order to do an archive we need to be able to display web versions from their website.

stephenatgendall, 6 years ago

Here's a script for loading up the urls into an array, you could also get the subject with some modification:

    <script type="text/javascript">
        var $jQ = jQuery.noConflict();

        $jQ(document).ready(function(){
            date_url = {}; // we're going to put all the date / url relationships in this object
           
            $jQ('#cmarchive li').each(function(i){
                // get the webversion url
                href = $jQ(this).find('a').attr('href');

                // get the webversion date
                text = $jQ(this).text();
                text = text.split(",");
                date = text[text.length-1]; //this part of the string contains the date

                // put the date into what ever format you need
                date = new Date(date);
                day = date.getDate();
                month = date.getMonth()+1;
                year = date.getFullYear();
                if(day < 10) { day = "0"+day; }
                if(month < 10) { month = "0"+month; }
                full_date = day+"."+month+"."+year;

                // add the date / url relationship to the date_url object
                date_url[full_date] = href;
            });
        });
    </script>

    <div id="cmarchive" style="display:none;">
        <script type="text/javascript" src="[copy and paste script address]"></script>
    </div>

Mathew Mathew, 6 years ago

That's great Stephen! I'm sure people will find it helpful.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098