{"id":24011,"library":"marketing-attribution-models","title":"marketing-attribution-models","description":"A library for marketing attribution modeling, providing implementations of popular attribution methods such as first-click, last-click, linear, time-decay, position-based, and Markov chain models. Current version 1.0.11, with an active maintenance cadence on GitHub. Requires Python >=3.5.","status":"active","version":"1.0.11","language":"python","source_language":"en","source_url":"https://github.com/DP6/Marketing-Attribution-Models","tags":["marketing","attribution","markov-chain","heuristic"],"install":[{"cmd":"pip install marketing-attribution-models","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for data manipulation and DataFrame operations","package":"pandas","optional":false},{"reason":"Used for numerical computations","package":"numpy","optional":false},{"reason":"Used for plotting attribution results","package":"matplotlib","optional":true}],"imports":[{"wrong":"from marketing_attribution_models import AttributionModel","symbol":"AttributionModel","correct":"from marketing_attribution_models import AttributionModel"}],"quickstart":{"code":"import pandas as pd\nfrom marketing_attribution_models import HeuristicAttribution\n\n# Sample journey data\njourneys = pd.DataFrame({\n    'path': ['A > B > C', 'A > C > B'],\n    'conversion': [1, 0],\n    'revenue': [100, 0]\n})\n\nmodel = HeuristicAttribution(method='linear')\nresult = model.attribution(journeys)\nprint(result)","lang":"python","description":"Create a HeuristicAttribution model with the 'linear' method and fit it to sample journey data."},"warnings":[{"fix":"Use 'first-click' instead of 'first_click' as the method argument.","message":"In v1.0.9, the method 'first_click' was renamed to 'first-click' to conform with other method names. Code using 'first_click' will break.","severity":"breaking","affected_versions":">=1.0.9"},{"fix":"Read the CSV into a DataFrame with pd.read_csv before calling attribution.","message":"The 'attribution' method on HeuristicAttribution and MarkovChainAttribution now requires a DataFrame instead of a CSV file path. Passing a file path is deprecated.","severity":"deprecated","affected_versions":">=1.0.9"},{"fix":"Ensure the path column uses ' > ' as the separator between touchpoints.","message":"The 'path' column must use ' > ' (space-greater than-space) as separator. Other delimiters like '>>' or '->' will cause incorrect parsing.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.11':38 '3.5':48 'activ':41 'attribut':3,9,15,50 'base':31 'cadenc':43 'chain':34,53 'click':21,24 'current':36 'decay':28 'first':20 'first-click':19 'github':45 'heurist':54 'implement':12 'last':23 'last-click':22 'librari':6 'linear':25 'mainten':42 'market':2,8,49 'marketing-attribution-model':1 'markov':33,52 'markov-chain':51 'method':16 'model':4,10,35 'popular':14 'posit':30 'position-bas':29 'provid':11 'python':47 'requir':46 'time':27 'time-decay':26 'version':37","created_at":"2026-05-01T08:10:48.913551+00:00","updated_at":"2026-05-01T08:10:48.913551+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"/tmp/tmpod_r7d6r/venv/lib/python3.12/site-packages/matplotlib/style/__init__.py\", line 130, in use\n    style = rc_params_from_file(style, use_default_template=False)\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/tmp/tmpod_r7d6r"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.0.10","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/DP6/Marketing-Attribution-Models","docs":null,"changelog":null,"pypi":"https://pypi.org/project/marketing-attribution-models/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}