GithubHelp home page GithubHelp logo

gnumarcelo / campaigning Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 9.0 181 KB

A Ruby Gem to access the Campaing Monitor API (http://www.campaignmonitor.com/api/v2/) using SOAP protocol.

License: MIT License

Ruby 100.00%

campaigning's People

Contributors

gnumarcelo avatar zzemla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

campaigning's Issues

How to use multiple subscribers at a time in a list?

Hi Campaign monitor Team,

Thanks for building this kind of API external library.

Now i am using your campaign API. Now i have used single subscriber method for a list.

A list can have multiple subscribers.My server and campaign monitor server will communicate more than an hour.it dependents upon the no of subscribers. How to do you reduce subscriber request.

I have refer in campaign motioner API. They keep available API method for Importing many subscribers(http://www.campaignmonitor.com/api/subscribers/#importing_subscribers)

How do use in this gem. can you give me example.

I am really looking for wared your commands and suggestions on this.

Thanks,
Pal

Creating a new campaign

To whom it may concern,

On trying to create a new Campaign from within my application I get the error:
311 - Invalid HTML Content

RAILS_ROOT: /Users/stefjongkind/Development/RailsApps/anahata
Application Trace | Framework Trace | Full Trace

vendor/plugins/campaigning/lib/campaigning/module_mixin.rb:23:in handle_response' vendor/plugins/campaigning/lib/campaigning/campaign.rb:63:increate!'

I can create lists alright, but creating a campaign seems to fail.
I have the following code in my controller:

def new_campaign
@client = Campaigning::Client.find_by_name("Anahata Retreat")
if request.post?
unless params[:campaign][:campaignSubject].blank? or params[:campaign][:title].blank?
list = Campaigning::List.create!(
:clientID => @client.clientID,
:title => params[:campaign][:title],
# :unsubscribePage => "http://www.mycompany.com/campaign/ubsubscribe.html", #If not suplied or equals blank (""), default value will be used
:confirmOptIn => false,
:confirmationSuccessPage => "" #Default value will be used
)
campaign = Campaigning::Campaign.create!(
:clientID => @client.clientID,
:campaignName => "Campaign created for Anahata Retrea",
:campaignSubject => params[:campaign][:campaignSubject].to_s,
:fromName => "Anahata Retreat",
:fromEmail => "[email protected]",
:replyTo => "[email protected]",
:htmlUrl => "http://www.anahata-retreat.org.nz",
:textUrl => "http://www.anahata-retreat.org.nz" ,
:subscriberListIDs => [list.listID],
:listSegments => @client.segments
)
end
end
end

The list gets created, but the Campaign gives the error. Can anyone please, shine a light on this? Many Thanks,

Stef Jongkind

Conflict with other gems or plugins?

Does campaigning have any known conflicts with other gems or plugins? When I try to run the campaigning gem on my production server, I get the error:
no such file to load -- campaigning

And when I try to run it as a plugin, I get:
uninitialized constant ContentsController::Campaigning

Here's what I'm running -
Installed gems:
actionmailer (2.3.5, 2.3.4)
actionpack (2.3.5, 2.3.4)
activemerchant (1.5.1)
activerecord (2.3.5, 2.3.4)
activeresource (2.3.5, 2.3.4)
activesupport (2.3.5, 2.3.4)
builder (2.1.2)
crack (0.1.7, 0.1.6)
gemcutter (0.5.0)
git (1.2.5, 1.2.2)
gnumarcelo-campaigning (0.14.0)
httparty (0.5.2)
httpclient (2.1.5.2)
jeweler (1.4.0, 1.2.1)
json_pure (1.2.4)
log4r (1.1.8)
mechanize (1.0.0)
mini_magick (1.2.5)
mysql (2.8.1)
nokogiri (1.3.0)
rack (1.0.1)
rails (2.3.5, 2.3.4)
rake (0.8.7)
rmagick (2.13.1)
rubyforge (2.0.4)
soap4r (1.5.8)

Plugins:
2dc_jqgrid
jrails
paperclip
squirrel
campaigning
newrelic_rpm
restful_authentication
will_paginate

Thanks for your time and help!

Jon

Can't figure out how to send segmented campaigns

I'm having trouble sending segmented campaigns. The segments are working correctly on the CM side so I must be using the gem incorrectly. Can someone spot my problem?

Each of the campaigns created (1 per segment) is sent to everyone on the list, i.e. is not limited to the subscribers within the segment.

client = Campaigning::Client.find_by_name(::CAMPAIGN_MONITOR_CLIENT_NAME, :apiKey => ::CAMPAIGN_MONITOR_API_KEY)
list = client.find_list_by_name('subscribers')
# Create a separate campaign for each segment of the list
client.segments.select { |segment| segment.listID == list.listID }.each do |segment| # Can't see a better way of finding the segments of a list ...
  campaign = Campaigning::Campaign.create!(
    :clientID => client.clientID,
    :campaignName => "Test email to #{segment.name} at #{Time.now.to_i}",
    :campaignSubject => "Test email to #{segment.name} at #{Time.now.to_i}",
    :fromName => ..., :fromEmail => ..., :replyTo => ..., :htmlUrl => ..., :textUrl => ...,
    :apiKey => ::CAMPAIGN_MONITOR_API_KEY,
    :subscriberListIDs => [list.listID],
    :listSegments => [segment]
  )
end

I appreciate any assistance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.