advertools.kw_generate module — advertools 0.1a1 documentation

# advertools.kw_generate module

`advertools.kw_generate.` `kw_generate`(products, words, max_len=3, match_types=['Exact', 'Phrase', 'Modified'], campaign_name='SEM_Campaign')

  Generate a data frame of kewywords using a list of products and relevant words.

  products : will be used as the names of the ad groups words : related words that make it clear that the user is interested in products max_len : the maximum number of words to include in each permutation of product keywords match_types : can be restricted or kept as is based on preference, possible values:

  > ‘Exact’, ‘Phrase’, ‘Modified’, ‘Broad’

  campaign_name : name of campaign >>> import advertools as adv >>> products = [‘bmw’, ‘toyota’] >>> words = [‘buy’, ‘second hand’] >>> kw_df = adv.kw_generate(products, words) >>> kw_df.head()

  > Campaign Ad Group Keyword Criterion Type Labels

  0 SEM_Campaign Bmw bmw buy Exact Buy 1 SEM_Campaign Bmw bmw buy Phrase Buy 2 SEM_Campaign Bmw +bmw +buy Modified Buy 3 SEM_Campaign Bmw bmw second hand Exact Second Hand 4 SEM_Campaign Bmw bmw second hand Phrase Second Hand

      >>> kw_df.tail()
              Campaign Ad Group                    Keyword Criterion Type           Labels
      55  SEM_Campaign   Toyota     second hand toyota buy         Phrase  Second Hand;Buy
      56  SEM_Campaign   Toyota  +second hand +toyota +buy       Modified  Second Hand;Buy
      57  SEM_Campaign   Toyota     second hand buy toyota          Exact  Second Hand;Buy
      58  SEM_Campaign   Toyota     second hand buy toyota         Phrase  Second Hand;Buy
      59  SEM_Campaign   Toyota  +second hand +buy +toyota       Modified  Second Hand;Buy

  keywords_df : a pandas.DataFrame ready to upload