11 Replies Latest reply on May 4, 2017 6:18 PM by Sanford Whiteman

    Tokens for language paths in URLS

    Joanna Kenney

      We have several different websites that are localized by country. We also have a large resource library on our site (each one).

       

      To localize our website, we have different language paths in the URLs. We track each resource that people download by having a separate program and smart campaign that drives people into individual SFDC campaigns. We do not separate SFDC campaigns by country, which means our trigger is based on the form they fill out and the URL they fill out the form on (each URL with the different language paths).

       

      Often we have to fix a previous language path (en-uk to en-gb) or add additional language paths. I want to tokenize this so this process is global and more easily editable and fixable. But I haven't found a way to really do this effectively, has anyone else been able to do this or does anyone have any ideas for ways to do this?

       

      Thank you!

        • Re: Tokens for language paths in URLS
          Jamie Maynard

          Hi Joanna!

           

          Let me make sure I'm understanding the scenario.

           

          A resource like:

          1. Definitive Guide to Compliance Program Assessment | NAVEX Global (UK version)  
          2. Definitive Guide to Compliance Program Assessment | NAVEX Global (US version)

           

          Will have one Marketo program and one SFDC campaign, correct? You'll use a smart campaign that looks at form fill and URL to add people to that program.

           

          Then, when you say you have to "fix" a previous language path, what do you mean by that? Also, can you give me a bit more detail around your thought process for tokens?

            • Re: Tokens for language paths in URLS
              Joanna Kenney

              Jamie,

               

              You have the scenario correct.

               

              An example of what I mean by "fix" a previous language path, when something goes from /en-uk/ to /en-gb/ for SEO purposes. The other situation I would like to solve for is when we add localized sites, for example we are in the process of launching a french version of our website that would be /fr-fr/. I would love to NOT have to go through all ~400 assets and add the links with the new french language path.

               

              I've globalized things using tokens in the past so I've been trying to figure out a way to do this with tokens, but I understand there may be a different way of going about this and I'm open to all those things.

               

              Thanks!

                • Re: Tokens for language paths in URLS
                  Sanford Whiteman

                  Not sure there's any special trick here. Language in your examples is just another segment of the path. As such, if it exists verbatim as a lead field, include that token. If it needs to be derived from other fields, use Velocity.

                  • Re: Tokens for language paths in URLS
                    Jamie Maynard

                    From what I understand, you're using the "fills out form" trigger with the constraint of "web page." This constraint's operators are "is" and "is not" which forces you to type the entire URL. It would sure be nice to have a "contains" operator, am I right?!

                     

                    Tokens are great, but not the solution to this challenge. Have you thought about assigning an asset ID to each piece of content? You can easily use the program number in the Marketo URL to give you a standard ID. Include the asset ID as a hidden field on the form. Once the data value changes to the asset ID associated with the program, make them a member of the Marketo/SFDC campaign and then null out the value or allow it to be overwritten for each resource.

                     

                    There are a few other ways you could solve...that's the one that popped into my head first!

                      • Re: Tokens for language paths in URLS
                        Sanford Whiteman

                        From what I understand, you're using the "fills out form" trigger with the constraint of "web page." This constraint's operators are "is" and "is not" which forces you to type the entire URL. It would sure be nice to have a "contains" operator, am I right?!

                        The Referrer constraint of the Filled Out Form activity refers to the hosting page. It does support [Contains] and is the recommended way to track form context.

                        • Re: Tokens for language paths in URLS
                          Sanford Whiteman

                          You can easily use the program number in the Marketo URL to give you a standard ID. Include the asset ID as a hidden field on the form. Once the data value changes to the asset ID associated with the program, make them a member of the Marketo/SFDC campaign and then null out the value or allow it to be overwritten for each resource.

                           

                          There are a few other ways you could solve...that's the one that popped into my head first!

                          What I think you're calling the "program number" in the URL hash in the Marketo UI isn't guaranteed to be the same as the Program ID (and isn't documented to be static for a given Program ID).  So you definitely shouldn't key off this value. You might key off (to a degree, as I'll note next) the actual {{Program.Id}}.

                           

                          But the problem is "when the data value changes to a {{token.value}}" is not something you can check in a native Flow.

                            • Re: Tokens for language paths in URLS
                              Jamie Maynard

                              I wasn't suggesting she use a token for the program ID. I'm recommending a unique asset ID for each white paper/piece of content. You can use the Program Number in the URL to generate the Asset ID  (the part after /#PG) https://app-ab17.marketo.com/#PG1466A1 OR you can come up with another system.

                                • Re: Tokens for language paths in URLS
                                  Sanford Whiteman

                                  You can't use the #PGnnnn because isn't guaranteed to be static. It's a UI artifact that's helpful for locating programs, but shouldn't be used for this purpose. The actual {{Program.Id]} is a native token that is guaranteed unique and accurately reflects the Program in the database.

                                   

                                  Either way, the problem is that you can't assign program membership based on two variables matching in a Flow. Or perhaps you didn't describe your theoretical Smart Campaign(s) completely.  A screenshot would help.

                                    • Re: Tokens for language paths in URLS
                                      Jamie Maynard

                                      I'll try again. Let me know if you see holes.

                                       

                                      1. Create a field value called "Asset ID" that you assign to each white paper. It doesn't matter HOW you come up with the Asset ID.  You can start from 100 and work your way up if that's easier. 

                                       

                                      Let's take the white paper above as an example: Definitive Guide to Compliance Program Assessment | NAVEX Global. We'll give it an asset ID of 123. This content, though it has different URLs for language, is housed in one program in Marketo with a corresponding SFDC campaign.

                                       

                                      If you can populate a hidden field with the asset ID for that specific white paper, then we could trigger off data value changes, new value is 123.

                                       

                                      Your original point about referrer would be an easier and better solution since it doesn't require any additional fields. 

                                        • Re: Tokens for language paths in URLS
                                          Sanford Whiteman

                                          You don't need to assign the Asset ID manually, and I think it does matter how you come up with it, because you want it to be as frictionless as possible to deploy. A separate ID provisioning process is just another spreadsheet to mess up! If there's one Asset ID per Program ID, then it stands to reason you should reuse the {{Program.Id}} as the Asset ID. You can add this to URLs as necessary in order to create groups of URLs linked to a single "virtual asset."

                                           

                                          Nevertheless, the rest of the workflow would depend on hard-coding the IDs in Smart Campaigns(s) in order to find matches and assign Programs. Not that it wouldn't work, but for me, it wouldn't be maintainable. I think the whole thing (meaning how languages are encoded in URLs, how database and page content is segmented by language, how assets are named) probably needs to be rethought from the ground up.  Ideally you should be able to clone a program -- thus instantiating a new Program ID -> Asset ID -- and not have to copy-and-paste anything else to bring people into the program. (Unfortunately, using global forms inhibits such a project,, since you lose the extremely valuable program-local context)