want to Show Different Ads To Different Visitors

Discussion in 'Programming' started by deepmob, Mar 11, 2011.

  1. #1
    I got a site with imagehosting.

    now I had ads there.

    I want to do somet thing so that I can show diffrent ads to diffrent domain visitors.

    for exmaple

    doman a visitors view ads for X adnetwork

    doman b visitors view ads form y adnetwork

    etc

    if you got my point then help or I explain more

    thanks
     
    deepmob, Mar 11, 2011 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Simply have a piece of code that checks the domain the visitor is viewing and then inserts the appropriate code for the ads depending on that.

    We have done similar before with Google Adsense and changed the ID dependant on the visited domain.
     
    AstarothSolutions, Mar 11, 2011 IP
  3. deepmob

    deepmob Well-Known Member

    Messages:
    128
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    can you give me the code please

    thanks
     
    deepmob, Mar 11, 2011 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The code was a simple snippit that we had in the masterpage and its output was put into a Literal control within the normal google adsense code.

    Dim DomainST as String = Request.Url.Host()
    Dim AdvertID as String
    
    Select Case DomainST
        Case "Domain1.com"
            AdvertID = "a5135131"
        Case "Domain2.com"
            AdvertID = "2312f232"
        Case Else
            AdvertID = "r2324ws"
    End Select
    
    GoogleLT.Text = AdvertID
    
    Code (markup):
     
    AstarothSolutions, Mar 11, 2011 IP
  5. deepmob

    deepmob Well-Known Member

    Messages:
    128
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    can you give a example that how I can put it in the page of the site
     
    deepmob, Mar 11, 2011 IP