Which Template Tag for unique Campaign ID?

Discussion in 'General discussions' started by Papapooch, Sep 26, 2017.

  1. Papapooch

    Papapooch Member

    Joined:
    May 25, 2017
    Messages:
    118
    Likes Received:
    12
    S.E:
    2020-03-27 04:44:57
    L.T:
    Regular
    L.C:
    5
    Hi,
    I am asked by an Advertising partner to include Links that will have a parameter value of an ID that is unique for a particular campaign and can be used to Query other campaign details.

    In the SQL Tables I see CAMPAIGN_ID and CAMPAIGN_UID. But I only see [CAMPAIGN_UID] as a valid Template Tag.

    Will [CAMPAIGN_ID} render in the template, or must I use CAMPAIGN_UID] ?

    Thanks
     
  2. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,725
    Likes Received:
    683
    S.E:
    2020-11-29 06:30:25
    L.T:
    Regular
    L.C:
    8
    [CAMPAIGN_ID] will not render (as it is a mwz internal variable)

    [CAMPAIGN_UID] renders and is what you see in the links here
    https://mwzDomain.com/customer/campaigns/xy1234abcd3iu/overview
    https://mwzDomain.com/customer/campaigns/[CAMPAIGN_UID]/overview
    https://mwzDomain.com/lists/this1listh3r3/unsubscribe/th1s1subscrbr/xy1234abcd3iu
    https://mwzDomain.com/lists/this1listh3r3/unsubscribe/th1s1subscrbr/[CAMPAIGN_UID]
     
    Papapooch likes this.
  3. Papapooch

    Papapooch Member

    Joined:
    May 25, 2017
    Messages:
    118
    Likes Received:
    12
    S.E:
    2020-03-27 04:44:57
    L.T:
    Regular
    L.C:
    5
    @frm.mwz Thanks...just got back to the forum and saw this. Appreciate the response!;)
     
  4. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,725
    Likes Received:
    683
    S.E:
    2020-11-29 06:30:25
    L.T:
    Regular
    L.C:
    8
    You're welcome :)
     
  5. Papapooch

    Papapooch Member

    Joined:
    May 25, 2017
    Messages:
    118
    Likes Received:
    12
    S.E:
    2020-03-27 04:44:57
    L.T:
    Regular
    L.C:
    5
    Hello all,
    I am trying to pull a Clicks count of particular URLS in a bunch of related Campaigns... to report to our customers. Basically the URLS we want are the ones that generate money for our customers, as opposed to urls like "Privacy Policy" or "Unsubscribe". We have not Grouped campaigns yet to make that easier. Right now, from the front-end if we select all the campaigns we want to query about clicks and then export...we get the Click Counts but not the actual URLS that were clicked. So I am trying to do this with SQL queries on the database. What is the difference between MW_CAMPAIGN_URL and MW_CAMPAIGN_TRACK_URL? And how are they related? I can relate a group of selected CAMPAIGN_IDs to the MW_CAMPAIGN_URL table but it doesn't appear to return enough records. While MW_CAMPAIGN_TRACK_URL seems to have enough records to list ALL the clicks, there is no CAMPAIGN_ID to relate on. I am trying to find the SQL code in the PHP files that Twisted1919 uses so I can get some clues...but no luck yet.

    Thanks to anyone that can shed some light on this for me!
     
  6. Papapooch

    Papapooch Member

    Joined:
    May 25, 2017
    Messages:
    118
    Likes Received:
    12
    S.E:
    2020-03-27 04:44:57
    L.T:
    Regular
    L.C:
    5
    OK I guess I jumped the gun with that question as I think I have made sense of the tables.
    I started with campaign_url and joined campaign_track_url on url_id. That gave me the correct number of clicks I was looking for.
    From that I was able to see the "destination" url and then pulled my data on campaign IDs with a subquery....
    where t.campaign_id IN
    (select c.campaign_id from mw_campaign c where c.name LIKE 'PartialCamapignName%').


    So we have a start! I can probably follow a similar path when dealing with Unsubscribes.
    Thanks all...have a nice day!
     

Share This Page